Curl multi Interface Patch
| From: | Boris Bukowski | Date: | Sun, 13 Oct 2002 19:30:27 +0000 |
| Subject: | Curl multi Interface Patch | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-89414@lists.php.net to get a copy of this message | ||
Hi,
this works for me with curl-7.9.8 and php-4.2.3 under Linux.
Problems are:
* curl_easy_cleanup segfaults after curl_multi_cleanup
* I have to introduce Version checking in these m4 Files
Please give me suggestions howto make it clean and stable.
thx Boris
Here an example what this patch enables:
<?
// creates a multi session
$multi = curl_multi_init();
// start of a normal easy session
$ch1 = curl_init("http://192.168.4.2/");
$ch2 = curl_init("http://192.168.4.2/");
curl_setopt($ch1,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch2,CURLOPT_RETURNTRANSFER,1);
// adding the easy handles to the multi hndle
curl_multi_add ($multi,$ch1);
curl_multi_add ($multi,$ch2);
// executing all
curl_multi_exec($multi);
// getting content
$c1=curl_get_content($ch1);
$c2=curl_get_content($ch2);
curl_close($ch1);
curl_close($ch2);
echo "<br>ch1=".strlen($c1);
echo "<br>ch2=".strlen($c2);
?>
Regards Boris Bukowski
Attachment: [text/x-diff] php_multi_curl_patch
Attachment: [text/x-diff] php_multi_curl_patch