Well... I have a general problem, but I will give a specific example and maybe some of the pros here could help me out...
Lets say that I have a list of 1000 proxies, I wrote a simple php script that will curl some page and I check if I got back the page (I check a site that blocks multiply attempts to make sure I dont use tranparent proxy).
Any way it works fine... but randomly hangs! which means the script just stop working/freezing, it can happen after 40 proxies I check or after 200, what I usually do is to delete the proxies that were checked and hit F5.
Now... this is a general probem, cause it happens to me afterwards when I use the proxies I check to curl some places, it curls for a while and then hangs!!! WTF???
For the tech freaks here, this is how I do it, all the curling is located in a specific class, and the options are set like this:
$proxy=$this->getProxy(); //will get a random proxy from the list
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt ($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt ($ch, CURLE_OPERATION_TIMEOUTED, $timeout);
curl_setopt ($ch, CURLOPT_DNS_CACHE_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_REFERER, $referer);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_FORBID_REUSE, true);
curl_setopt($ch, CURLOPT_FAILONERROR, false);
curl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, false);
$result['EXE'] = curl_exec($ch); //here it hangs!!!!!!!!!!!!!!!!!!!!!!!!!
$result['ERR'] = curl_error($ch);
$result['INF'] = curl_getinfo($ch);
curl_close($ch);
Any Ideas???
Lets say that I have a list of 1000 proxies, I wrote a simple php script that will curl some page and I check if I got back the page (I check a site that blocks multiply attempts to make sure I dont use tranparent proxy).
Any way it works fine... but randomly hangs! which means the script just stop working/freezing, it can happen after 40 proxies I check or after 200, what I usually do is to delete the proxies that were checked and hit F5.
Now... this is a general probem, cause it happens to me afterwards when I use the proxies I check to curl some places, it curls for a while and then hangs!!! WTF???
For the tech freaks here, this is how I do it, all the curling is located in a specific class, and the options are set like this:
$proxy=$this->getProxy(); //will get a random proxy from the list
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt ($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt ($ch, CURLE_OPERATION_TIMEOUTED, $timeout);
curl_setopt ($ch, CURLOPT_DNS_CACHE_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_REFERER, $referer);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_FORBID_REUSE, true);
curl_setopt($ch, CURLOPT_FAILONERROR, false);
curl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, false);
$result['EXE'] = curl_exec($ch); //here it hangs!!!!!!!!!!!!!!!!!!!!!!!!!
$result['ERR'] = curl_error($ch);
$result['INF'] = curl_getinfo($ch);
curl_close($ch);
Any Ideas???