How do I Parse the response I get back from CURL?

Posted by Daelan on Stack Overflow See other posts from Stack Overflow or by Daelan
Published on 2010-03-17T04:11:41Z Indexed on 2010/03/17 4:21 UTC
Read the original article Hit count: 159

Filed under:
|

I'm sending some data to an external URL using Curl. The server sends me back a response in a string like this:

trnApproved=0&trnId=10000002&messageId=7&messageText=DECLINE

I can assign this string to a variable like this:

$txResult = curl_exec( $ch );
echo "Result:<BR>"; echo $txResult;

But how do I use the data that is sent back? I need a way to get the value of each variable sent back so that I can use it in my PHP script.

Any help would be much appreciated.

Thanks.

© Stack Overflow or respective owner

Related posts about curl

Related posts about php