php - multi curl does not work asynch with different proxies -
so using parallelcurl lib in code, have tried other wrappers , result pretty same, is, if specify proxy requests not handled asynchronously sequentially, not specify proxy option works should in async...why? have add using hhvm not seem problem it...
$timeout = 2; $opt_arr = array( curlopt_followlocation => 1, curlopt_returntransfer => 1, curlopt_header => 1 curlopt_connecttimeout => $timeout ); $parallelcurl = new parallelcurl(200, $opt_arr); foreach($proxies $proxy){ $opt_arr[curlopt_proxy] = $proxy; $parallelcurl->setoptions($opt_arr); $parallelcurl->startrequest($url, 'callback_p', array('proxy'=> $proxy)); } $parallelcurl->finishallrequests();
so problem not in php or curl, in test url, totally had tunnel vision , never occurred me since testing them against google, , seems google hard cap requests @ 17 threads, after throws out denies
Comments
Post a Comment