how to build URL to csv file on third-party server (cron/mass-import)

  • Posts: 3
  • Thank you received: 0
8 years 1 month ago #252132

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6.21
-- Browser(s) name and version -- : 49.0.1
-- Error-message(debug-mod must be tuned on) -- : JPath: check snooping out of bounds (no login information was included in the URL)

Our business has just changed to a new stock and cash software system (easypos) build on a mysql database. They also provided a dataconnector API to which we can login using a URL, username, password and an API-token for communication. This should enable us to download csv files from their server for upload to our webserver (joomla hosting).
We also received documentation containing a URL like:
services.easyposonline.nl/i-shop/ <path to csv>/*.csv
Their manual says that we have to use POST parameters in the url (login_user:<username> login_pass<password> login_app:<i-shop> login_type:<plain>)
Could you give an example of an imaginary, syntactically correct URL with POST-parameters? Can I use this directly in the cron-udate-plugin or mass-action modules or plugins? I would like to know if this is an easy job or do we need a specialist for this? (I have some experience writing php-code, but little experience in writing complicated URL's ). Maybe we have to write (or let our software provider write) a modified php-plugin page ?
I hope you can point us in the right direction.
(we also asked for more information from the service provider, still waiting for an answer)
Thanks in advance.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 1 month ago #252139

Hi,

You can't have POST parameters in a URL. In HTTP you can pass parameters either through the URL (and they are called GET parameters) or through the request body (and they are called POST parameters and don't appear in the URL).
So having POST parameters in a URL goes against the definition of HTTP itself.

I would recommend to use the cron update plugin, however it only supports GET parameters in the URL of the CSV.
So it would require some modifications by a PHP developer if you want to be able to retrieve the CSV file with POST parameters.

Please Log in or Create an account to join the conversation.

Time to create page: 0.111 seconds
Powered by Kunena Forum