call to "159.89.191.89" and "CURLPROXY_SOCKS5" was unsuccessful.
error code: 7
error message: Couldn't connect to server: Failed to connect to 159.89.49.217 port 8080: Connection refused
$multi_curl->error(function($instance) use (&$arrayUnSuccess) {
echo 'call to "' . $instance->myTag["Ip"] . '" and "' . $instance->myTag["type"] . '" was unsuccessful.' . "<br>";
echo 'error code: ' . $instance->errorCode . "<br>";
echo 'error message: ' . $instance->errorMessage . "<br>";
});
call to "159.89.191.89" and "CURLPROXY_SOCKS5" was unsuccessful.
error code: 7
error message: Couldn't connect to server: Failed to connect to 159.89.49.217 port 8080: Connection refused
foreach ($arrayProxy as $proxy) {
$instance = $multi_curl->addGet('https://ya.org');
$proxy['type'] = $type;
$instance->myTag = $proxy;
}
public function addGet($url, $data = array())
{
if (is_array($url)) {
$data = $url;
$url = $this->baseUrl;
}
$curl = new Curl();
$this->queueHandle($curl);
$curl->setUrl($url, $data);
$curl->setOpt(CURLOPT_CUSTOMREQUEST, 'GET');
$curl->setOpt(CURLOPT_HTTPGET, true);
return $curl;
}
public function addGet($orderDetails, $url, $data = array())
{
if (is_array($url)) {
$data = $url;
$url = $this->baseUrl;
}
$curl = new Curl();
$this->queueHandle($curl);
$curl->setUrl($url, $data);
$curl->setOpt(CURLOPT_CUSTOMREQUEST, 'GET');
$curl->setOpt(CURLOPT_HTTPGET, true);
$array[] = array(
'details' => $orderDetails,
'curl' => $curl
);
return $array;
}
Поясняю: Мой скрипт - proxy чекер, т.е. он проверяет работоспособность proxy.
Я загружаю в Multi curl 5 разных proxy, разные IP и разные порты, а в ответе получаю сами посмотрите что...
т.е. запрос происходит через proxy 159.89.191.89, а в ошибке выдается другой proxy из другого запроса!!