I'm using curl_multi to test a set of proxies, which proved to be working before. My code is working fine, but I get a lot of errno 7 responses, which I find hard to understand:
Failed connect to example.com:1; Operation now in progress
Failed connect to example.com:1; Success
(example.com stands here for my actual server with test script)
in basic curl same addresses might return:
couldn't connect to host
What might be the actual meaning of those messages?
How I prepare each handle:
function prepare_handle($item) {
$options = array();
$options[CURLOPT_RETURNTRANSFER] = 1;
$options[CURLOPT_REFERER] = TEST_REFERER;
$options[CURLOPT_PROXY]=trim($item['address']);
$options[CURLOPT_FRESH_CONNECT]=TRUE;
//$options[CURLOPT_CONNECTTIMEOUT] = CHECK_CONNECTTIMEOUT; // 20
$options[CURLOPT_TIMEOUT] = CHECK_TIMEOUT; // 60
$options[CURLOPT_NOBODY]=TRUE; // remove body
$url = HTTP_GATE . '?id=' . $item['id'];
if($item['socks']>0) {
// ustaw socks
$options[CURLOPT_PROXYTYPE]='CURLPROXY_SOCKS5';
}
$ch = curl_init($url);
curl_setopt_array($ch,$options);
return $ch;
}