CURL & Session IDs
Date: Sun, 22 Jul 2007 02:23:50 -0400
Right now I'm running a multi_curl, but it still takes about 20 seconds to
run. I have a "loading" page which has this multi_curl script on it, but I
would like to also have a link on that page which lets the user end the
multi_curl execution and just parse out the results that have been retrieved
thus far. Is this possible?
The way I'm thinking right now, is to use one php session id and pass it to
each url that I use curl on. Then each url that is processed would just
write data to the session, which could then be read by any page.
The problem is, the script I'm using hangs. I don't think it is possible to
open simultaneous connections of the same sessionid. Here is an example of
what I'm trying to do...
$s = session_id();
$url = 'http://www.vegashotelhunt.com/test2.php?PHPSESSID='.$s;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
$finalvariable = $_SESSION['sidtest'];
$test = 'If you can read this on test.php, success!!';
Any help would be greatly appreciated.
Received on 2007-07-22