cURL and XML - Missing something basic?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a feeling there is just some basic info about exec that I do
not know. But I don't understand how to get back a response from a URL
using cURL (from the command line using exec()). Here's what I'm
trying to do:  Sending some XML data to a URL (the Select Payment real
time gateway, if anyone's familiar...). Then I expect to get some XML

Here's my code:
exec("/usr/local/bin/curl -m 120 -d \'$XPost\' https://$URL

where $XPost is my XML
$output returns a blank array

If I try (just for kicks):
passthru("/usr/local/bin/curl -m 120 -d \'$XPost\' https://$URL

then $output returns a 2.

Any help or direction is appreciated.


Re: cURL and XML - Missing something basic?


On 10/25/2004 03:39 PM, Courtney L. wrote:
Quoted text here. Click to load it

If all you want is to post a XML request to an SSL server, you may want
to try this HTTP client class that comes with examples to do exactly
what you want:


Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP /

PHP Reviews - Reviews of PHP books and other products /

Metastorage - Data object relational mapping layer generator

Site Timeline