468,296 Members | 1,300 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,296 developers. It's quick & easy.

cURL and XML - Missing something basic?

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
back.

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

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
-L",$output);

then $output returns a 2.

Any help or direction is appreciated.

Thanks,
Courtney
Jul 17 '05 #1
1 2020
Hello,

On 10/25/2004 03:39 PM, Courtney L. wrote:
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
back.


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:

http://www.phpclasses.org/httpclient
--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by lists04 | last post: by
9 posts views Thread by Conrad F | last post: by
7 posts views Thread by lawrence k | last post: by
4 posts views Thread by Terry | last post: by
4 posts views Thread by zorro | last post: by
1 post views Thread by c1pkw | last post: by
3 posts views Thread by Erwin Moller | last post: by
11 posts views Thread by Flexor | last post: by
3 posts views Thread by buzz2050 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.