even more, if you want to use curl...
I remember that curl can take post data from an input file, so dump the
$strXML to a temp file then supply that file to curl.
"Samantha Savvakis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm using the cURL binary to perform a HTTP POST to a web page. I am
> XML data to this web page.
> The issue I've come up against if the size of the data that I'm trying to
> post and it looks like cURL is crapping out.
> This is the command line that I'm currently using:
> /usr/local/bin/curl -m 600 -d "$strXML" http://myurl.com/webpage.php -L -s
> $strXML - variable containing the XML data. I run this command using
> The return code I receive is: 127. This means a fatal error has occured
> cURL but that's all I know.
> I have read the detail about using the -F option. I do not want to POST
> "file" as such, but rather the "DATA" in the file is I create a file of
> XML. The manpage for cURL states:
> "-F : To just get the content part from a file, prefix the file name with
> the letter <. The difference between @ and < is then that @ makes a file
> attached in the post as a file upload, while the < makes a text field and
> just get the contents for that text field from a file."
> So I've tried going:
> /usr/local/bin/curl -m 600 -F </tmp/tempfile.xml
> http://myurl.com/webpage.php -L -s
> /tmp/tempfile.xml - contains the XML data. This isn't working.I'm getting
> return code of "2" meaning: "Failed to initialize".
> I'm at a loss. I need to post this large amount of XML data to a remote
> and don't know how to get it there.
> Any ideas?
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php