Discuss PHP cURL. Send a file in the PHP Development forum on Dev Shed. PHP cURL. Send a file PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today.
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month! Download and Activate to enter!
Intel® Graphics Performance Analyzers is a powerful tool suite for analyzing and optimizing your games, media, and graphics-intensive applications. Used by some of the best developers on the planet, Intel GPA lets you maximize your app’s performance.
Posts: 21
Time spent in forums: 11 h 4 m 53 sec
Reputation Power: 0
PHP cURL. Send a file
Hi,
I have been looking for information about this problem for the last two days and nothing has worked as I needed, that's why I am writing here now.
I am working on connecting interfaces using XML messages and I have been always using cURL for this purpose with no problem. I just kept sending my xml message as a string inside a POST variable and always got the response with no much deal.
Since last week I have been requested to join the interface of the company where I work to a new channel we will join to. After reading the documentation of this new interface, I thought everything would just work the same way but it is not like this.
This new channel is indeed expecting to receive a xml FILE (not just a POST variable) and I have tried to send it in as many ways as I could think about and never worked. In fact, the only way I have gotten a real response from this channel was while using a <form> and a <input type="file" name="xmlfile"> and sending this file using the submit function of this form.
The problem is that in my code there is no place for a form, while everything is running internally with php code, being launched each time an update is needed.
I have been told that one call in the command line like this would work:
which worked just like in example 2 on the PHP site.
NOTE: On the URL above, I had to add spaces due to restrictions. I hope the admins don't get upset for me linking to the PHP site -- not like I'm trying to promote my own site.