function curl($url, $hosts, $post) { $ch = curl_init(); // $cookie = "Cookie:JSESSIONID=T9vkVfyFhCZ9wmrFmsBwmTZVrcW1pQD5jlm7jgSCdmTZ5qGQ5sGS!-406108419!-1994040270; visid_incap_188096=QAV/edWsSIWH9Ea7nXQT/79yn1UAAAAAQUIPAAAAAADeM0yNF1hA+HHMlazmSQIK; incap_ses_219_188096=TVsnfK/fnkwvy3qtdwwKA79yn1UAAAAA3syujoxNFT9EWs8DuuTeAg==; _ga=GA1.3.725555002.1436512962; BIGipServerpool_jobsbank.gov.sg_80_ipv4=1041294858.20480.0000; _gat=1"; // $headers[] = 'Accept:text/html,application/xhtml+xml,application/xml ;q=0.9,*/*;q=0.8'; // $headers[] = 'Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3'; // $headers[] = 'Accept-Language:en-US,en;q=0.8'; // $headers[] = 'Host:www.jobsbank.gov.sg'; // $headers[] = 'Cache-Control:max-age=0'; // $headers[] = 'Connection:keep-alive'; // curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); // curl_setopt($ch, CURLOPT_PROXY, '207.91.10.234:8080'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_AUTOREFERER, true); if ($post == 1) { $post = "{actionForm.checkValidRequest}=YES"; curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); } curl_setopt($ch, CURLOPT_USERAGENT, getRandomUserAgent()); curl_setopt($ch, CURLOPT_COOKIEJAR, "thaipost.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "thaipost.txt"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $data = curl_exec($ch); // echo $data; curl_close($ch); return $data; }
function curl($url, $host) { // u=https://www.graypools.com/fund-manager/801-73728&b=13&f=norefer // echo $url = 'http://proxymesh.com/web/browse.php?'.'u='.$url.'&b=29&f=norefer'; // $serverIP = rand(1,4); // echo $url = 'http://'.$serverIP.'.hidemyass.com/includes/process.php?action=update&idx=3'; $ch = curl_init(); // $cookie = 'Cookie:csrftoken=d8a5ewcWmE9MpiPaguwnowoaiaTG6236; sessionid=1e3ea5113a55b00cada3c9fd16978d3c; ki_t=1435383247906%3B1436332621426%3B1436373674101%3B2%3B47; ki_r=https%3A%2F%2Fwww.google.co.in%2F; s=pkf6kop8l89l6eb56k6jqlgec7; __utmt=1; __utma=196749165.320522092.1435383248.1436366885.1436498654.5; __utmb=196749165.1.10.1436498654; __utmc=196749165; __utmz=196749165.1436366885.4.3.utmcsr=startups.stackexchange.com|utmccn=(referral)|utmcmd=referral|utmcct=/questions/4134/what-is-the-best-proxy-rotation-server-for-web-crawling; _gat=1; _ga=GA1.2.320522092.1435383248'; //curl_setopt($ch, CURLOPT_PROXY, "anonymouse.org"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Host:' . $host)); // echo "\n".$server = getRandomProxies(); // $post = "u=".$url; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_PROXY, '207.91.10.234:8080'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_AUTOREFERER, true); // curl_setopt($ch, CURLOPT_POST, 1); // curl_setopt($ch, CURLOPT_POSTFIELDS, $post); curl_setopt($ch, CURLOPT_USERAGENT, getRandomUserAgent()); curl_setopt($ch, CURLOPT_COOKIEJAR, "thaipost.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "thaipost.txt"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $data = curl_exec($ch); // echo curl_error($ch); curl_close($ch); return $data; }
function curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_COOKIEJAR, "autotrader.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "autotrader.txt"); curl_setopt($ch, CURLOPT_USERAGENT, getRandomUserAgent()); $data = curl_exec($ch); curl_close($ch); return $data; }
function curl($url, $host) { $ckfile = tempnam("", "CURLCOOKIE"); $ch = curl_init(); //curl_setopt($ch, CURLOPT_PROXY, "anonymouse.org"); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_AUTOREFERER, true); curl_setopt($ch, CURLOPT_COOKIEJAR, "ebay.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "ebay.txt"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_USERAGENT, getRandomUserAgent()); $data = curl_exec($ch); curl_close($ch); $data = preg_replace("/<!--.*?-->/ms", "", $data); curl_close($ch); return $data; }
function dwn($url) { $ip = rand(0, 255) . '.' . rand(0, 255) . '.' . rand(0, 255) . '.' . rand(0, 255); $userAgent = getRandomUserAgent(); $ch = curl_init(); $headers = array(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT, $userAgent); $headers[] = "REMOTE_ADDR: {$ip}"; $headers[] = "HTTP_X_FORWARDED_FOR: {$ip}"; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); curl_close($ch); return $result; }
$headers = array(); $headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0"; $data = array(); if (0 != $g_redirect) { $s = GetServerObj($server); $req = file_get_contents("php://input"); if (0 == strcmp("5", $server)) { $data1 = $s->GetAudio($bookid, $chapter, $req); // user-defined HTTP Header $data = $data1["url"]; $headers = $data1["headers"]; } else { if (0 == strcmp("0", $server)) { //$headers["Referer"] = "http://www.pingshu8.com/Play_Flash/js/Jplayer.swf"; $headers["User-Agent"] = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"; $headers["User-Agent"] = getRandomUserAgent(); $data = $s->GetAudio($bookid, $chapter, $req); } else { $data = $s->GetAudio($bookid, $chapter, $req); } } $reply["bookid"] = $bookid; $reply["chapterid"] = $chapter; } else { if (strlen($keyword) > 0) { $servers = GetServers(); foreach ($servers as $k => $v) { if (0 != strcmp("0", $k)) { continue; } $result = Search($v["object"], $keyword);