curl multy - infinity loop
Posted: Sun Oct 26, 2008 12:27 pm
can somebody please check why is it entering into infinity loop?
path is array of URL's
infiniti loop is on
complete code
Thank you all
kind regards
path is array of URL's
infiniti loop is on
Code: Select all
do {
curl_multi_exec($mh,$running);
}
while ($running > 0);
Code: Select all
for($r = 0; $r<= count($path); $r++){
$ch[] = $r;
}
for($chInit = 0; $chInit<count($ch); $chInit++) {
$ch[$chInit] = curl_init();
curl_setopt($ch[$chInit], CURLOPT_URL, $path[$chInit]);
}
$mh = curl_multi_init();
for($chMH = 0; $chMH<count($ch); $chMH++){
curl_multi_add_handle($mh,$ch[$chMH]);
}
$running=null;
do {
curl_multi_exec($mh,$running);
}
while ($running > 0);
for($chMH1 = 0; $chMH1<count($ch); $chMH1++){
curl_multi_remove_handle($mh,$ch[$chMH1]);
}
curl_multi_close($mh);
Thank you all
kind regards