Send XML file with curl functions
| From: | Aaron Axelsen | Date: | Sat, 12 Apr 2008 21:37:58 +0000 |
| Subject: | Send XML file with curl functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-272948@lists.php.net to get a copy of this message | ||
I am trying to create the following command with the php curl functions:
curl -F "data=@domain.xml" "http://path/to/api"
The problem i'm having is that i'm creating the xml file with php - so the contents are stored in a variable. How can I send the contents of that variable via curl? I thought just assigning the xml variable to data would work - but it hasn't.
Any suggestions?
--
Aaron Axelsen
lists@frozenpc.net
Great hosting, low prices. Modevia Web Services LLC -- http://www.modevia.com