Hi, I recently took a few minutes to install cURL library. A few minutes later, I had a working PHP script, which uses cURL to send some data to a remote server and get a response. I then, of course, parse the response and PHP creates the appropriate page for output to end user. Worked great!
Now I am on the next level. I need to do the same thing, except send an XML document to a remote server. This is not a problem but the remote server wants me to pass an HTTP request header field before the XML document. How do you do this? Please examine this snippet and let me know what I need to add to my $outgoing_data in order to pass an http request header before the xml goes out... <? $outgoing_data=" <?xml version=\"1.0\"?> <Envelope> <Header> <ID>0</ID> <Type>Test</Type> <Time>$timestamp</Time> </Header> <Body> <TestData>This is a test message.</TestData> </Body> </Envelope>"; $URL="http://omitted_from_example.com/fakeurl"; exec("/usr/local/bin/curl -m 120 -d \"$outgoing_data\" $URL -L", $return_message_array, $return_number); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php