note 113355 added to function.curl-multi-select

From: Date: Mon, 30 Sep 2013 20:55:45 +0000
Subject: note 113355 added to function.curl-multi-select
Groups: php.notes 
Request: Send a blank email to php-notes+get-196431@lists.php.net to get a copy of this message
In 5.3.9+, curl_multi_select always returns -1. If this is your case, just wait a bit and then proceed like nothing ever happened: <?php do { $mrc = curl_multi_exec($multi, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); while ($active && $mrc == CURLM_OK) { //check for results and execute until everything is done if (curl_multi_select($multi) == -1) { //if it returns -1, wait a bit, but go forward anyways! usleep(100); } //do something with the return values while(($info = curl_multi_info_read($multi)) !== false){ if ($info["result"] == CURLE_OK){ $content = curl_multi_getcontent($info["handle"]); do_something($content); } } do { $mrc = curl_multi_exec($multi, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); } ?> ---- Server IP: 64.68.200.35 Probable Submitter: 69.157.94.246 ---- Manual Page -- http://php.net/manual/en/function.curl-multi-select.php Edit -- https://master.php.net/note/edit/113355 Del: integrated -- https://master.php.net/note/delete/113355/integrated Del: useless -- https://master.php.net/note/delete/113355/useless Del: bad code -- https://master.php.net/note/delete/113355/bad+code Del: spam -- https://master.php.net/note/delete/113355/spam Del: non-english -- https://master.php.net/note/delete/113355/non-english Del: in docs -- https://master.php.net/note/delete/113355/in+docs Del: other reasons-- https://master.php.net/note/delete/113355 Reject -- https://master.php.net/note/reject/113355 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#196431) next »