By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,439 Members | 1,641 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,439 IT Pros & Developers. It's quick & easy.

cURL and XML - Missing something basic?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.