patrickoq Posted June 2, 2011 Share Posted June 2, 2011 Hi, I hope it is possible to establish, what I am going to ask Currently I am using a site where I am entering a xml code, that is sent to certain workflow. That workflow returns me a few csv files within the same http session. So simply, there is a page with the TEXTAREA - where i enter xml code and subsequently I click on the Submit button. After that the new page is opened where I have links to csv files. I wonder if would be possible to establish that using php code. I would like to run everything in background, sending xml code to that workflow and get those files. Everything without opening that site, entering xml code, submitin that ,and clicking on each link to download those files. I am not looking for exact answer. Just if you can tell me where I can start. My php knowledge is not great, but I have written a few things so far. So if you can help where to start, I would be more than happy Thanks Quote Link to comment https://forums.phpfreaks.com/topic/238206-sending-xml/ Share on other sites More sharing options...
Adam Posted June 2, 2011 Share Posted June 2, 2011 PHP is more than capable of sending/receiving data and handling XML files. Though you've kind of only told us the process you go through at the minute and that you want it to be done in the background. You haven't explained where this XML or CSV files comes from, or what you want to do with them. We need a bit more information... Quote Link to comment https://forums.phpfreaks.com/topic/238206-sending-xml/#findComment-1224104 Share on other sites More sharing options...
patrickoq Posted June 2, 2011 Author Share Posted June 2, 2011 Hey MrAdam, First, I would like to thank you for your reply. Sorry I didn't provide enough details, however I am affraid I won't be able to give very specific description - simply don't know how the server part is done with all the details. But, try to give you as much info I can So, let's imagine the database that contains some information about 10k customers. I cannot access that database through SQL, SAP, etc... The only way is a website - as described previously. That site has a field(TEXTAREA) where I am entering an xml code. In that code i specify the customer id, user/pass to database, and some other details. The xml structure is always the same. Then I click on the submit button (form is submitted) - an xml message to be send regular XML punch. That xml code is sent in post array to the server. As a response from the server we get a new page where some values are passed via GET array, and on that page we have links to CSV files (each per requested customers) which we can download. Everything from xml punch up to end of workflow is run in one HTTP session. I don't know if it helped you at all in understanding my question. Unfortunately, don't know exactly how it is resolved on the server end. I only know this functionality from the client standpoint. As i said before I am not looking for exact answer. Will be happy, if you just give me some subjects related, where I can start loooking form Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/238206-sending-xml/#findComment-1224327 Share on other sites More sharing options...
patrickoq Posted June 5, 2011 Author Share Posted June 5, 2011 HEy, Ok, I found a way how to post that xml . I did it using cURL. As I said before as a response I get a new page with links to CSV files. So in html it looks like: <a href="link to csv"> etc... I might have random number of links on that page. Any idea how to download all those files automatically on the server ? So, somehow i need to read that result received from cURL, find all the links, and download and save them on the hd. Thanks in advance for any ideas. Quote Link to comment https://forums.phpfreaks.com/topic/238206-sending-xml/#findComment-1225422 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.