cURL and XML - Missing something basic?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Courtney L.

    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
  • Manuel Lemos

    #2
    Re: cURL and XML - Missing something basic?

    Hello,

    On 10/25/2004 03:39 PM, Courtney L. wrote:[color=blue]
    > 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.[/color]

    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:




    --

    Regards,
    Manuel Lemos

    PHP Classes - Free ready to use OOP components written in PHP
    Free PHP Classes and Objects 2026 Versions with PHP Example Scripts, PHP Tutorials, Download PHP Scripts, PHP articles, Remote PHP Jobs, Hire PHP Developers, PHP Book Reviews, PHP Language OOP Materials


    PHP Reviews - Reviews of PHP books and other products


    Metastorage - Data object relational mapping layer generator

    Comment

    Working...