error. content= 6) { $ch = curl_init(); $tmpfname = 'cookie' . $i . 'txt'; curl_setopt($session, CURLOPT_COOKIEJAR, $tmpfname); curl_setopt($session, CURLOPT_COOKIEFILE, $tmpfname); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HEADER, 1); $agents = array('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36'); $request_headers = array(); if (strpos($url, 'voeazul.com.br') !== false) { // $request_headers[] = 'User-Agent: ' . $agents[rand(0, sizeof($agents) - 1)]; $request_headers[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'; $request_headers[] = 'Accept-Language: pt-BR'; $request_headers[] = 'Accept-Encoding: gzip, deflate'; $referer = 'https://www.voeazul.com.br/home"'; curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers); } else { $request_headers[] = 'User-Agent: ' . $agents[rand(0, sizeof($agents) - 1)]; $request_headers[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'; } if (strpos($name, 'mercari') !== false) { curl_setopt($ch, CURLOPT_POST, 1); } curl_setopt($ch, CURLOPT_ENCODING, ''); //enable gzip compression curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36'); $timeout = 15; if (isset($_REQUEST['timeout'])) { $timeout = $_REQUEST['timeout']; } curl_setopt($ch, CURLOPT_TIMEOUT, timeout); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,5); curl_setopt($ch, CURLOPT_PROXYUSERPWD, $userPass); $ip = explode(':', $proxiesList[$i]); $url = str_replace('[ip]', $ip[0], $url0); curl_setopt($ch, CURLOPT_URL, str_replace('[rand]', rand(), $url)); curl_setopt($ch, CURLOPT_PROXY, $ip[0] . ":80"); if ($postFields !== '') { curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); curl_setopt($ch, CURLOPT_POST, true); } if ($referer != '') { curl_setopt($ch, CURLOPT_REFERER, $referer); } array_push($handles, $ch); curl_multi_add_handle($mh, $ch); } } $time_start= microtime(true); //execution time of the script $running = null; do { curl_multi_exec($mh, $running); if ($running > 0) { usleep(100000); } if ( microtime(true)-$time_start>($timeout-1)){ $running=0; } } while ($running > 0); if (strpos($string, '!') === 0) { $nonString = true; } else { $nonString = false; } for ($k = 0; $k < sizeof($handles); $k++) { $content = curl_multi_getcontent($handles[$k]); $http_code = curl_getinfo($handles[$k], CURLINFO_HTTP_CODE); unlink('cookie' . $k . 'txt'); if ($_REQUEST['debug'] == 1) { $debug = 'code=' . $http_code . ' name= ' . $name . ' content=' . htmlentities($content); } curl_close($handles[$k]); curl_multi_remove_handle($mh, $handles[$k]); if (stripos($url, 'craigslist.org') != false && $http_code == '404') { $http_status = 'Y'; } else if (stripos($url, 'sneakersnstuff.com') != false && strpos($content, $string) !== false) { $http_status = 'Y'; } else if (stripos($url, 'whoer.net') != false && $http_code == '404') { $http_status = 'Y'; } else if (stripos($url, 'walmart') != false && $http_code == '404') { $http_status = 'Y'; } else if (stripos($url, 'dofus') != false && $http_code == '302') { $http_status = 'Y'; } else if (stripos($url, 'wallmart.ca') != false && $http_code == '404') { $http_status = 'Y'; } else if ($name == 'linkedin' && $http_code == '200') { $http_status = 'Y'; } else if ($http_code == '405' && (stripos($url, 'ticketmaster') != false)) { if ($_REQUEST['debug'] == 1) { echo "debuggggggggggg!"; } $http_status = 'Y'; } else if ($http_code == '200') { if ($nonString) { if (strpos($content, str_replace('!', '', $string)) === false) { $http_status = 'Y'; } else { $http_status = 'N'; } } else { if ($string == "" || strpos($content, $string) !== false) { $http_status = 'Y'; } else { $http_status = 'N'; } } } else { $http_status = 'N'; } //} if ($http_status == 'Y') { $goodArr[$proxiesList [$k + ($j * $no)]] = $http_code; } else { $badArr[$proxiesList [$k + ($j * $no)]] = $http_code; } } } curl_multi_close($mh); if ($_REQUEST['debug'] == 1) { return array('good' => $goodArr, 'bad' => $badArr, 'debug' => $debug); } else { return array('good' => $goodArr, 'bad' => $badArr); } } ?>