Output of curl to an array.

From: Date: Tue, 19 Mar 2002 21:33:10 +0000
Subject: Output of curl to an array.
Groups: php.db 
Request: Send a blank email to php-db+get-17766@lists.php.net to get a copy of this message
Ok, lets say I have some code here: $result = array(); $ch = curl_init ("https://www.myverificationplace.com/verify.asp"); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $args); curl_setopt ($ch, CURLOPT_TIMEOUT, 120); // Set the timeout, in seconds. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec ($ch); curl_close ($ch); Now that we see that, how can I make it so that the output from curl, which is in the variable $result, will be an array, for each line of output? Some of the line of output looks like this: ssl_result_message=APPROVED ssl_txn_id=00000000-0000-0000-0000-000000000000 ssl_approval_code=000000 I need each of the lines to be turned into a variable. Any ideas as to how I might go about this? Thanks, Keith Posehn

« previous php.db (#17766) next »