$proxy_list_urls = explode("\n", $proxy_list_urls_file); if (!empty($proxy_list_urls)) { foreach ($proxy_list_urls as $key => $url) { $params = array(CURLOPT_REFERER => $url, CURLOPT_COOKIE => "referrer=" . $url); //refferer must be the same as site $SC->request($url, "POST", null, null, null, $params, $key); } $SC->execute(5); } $SC->clear_proxy(); $SC->clear_the_parse_list(); unset($SC); if (!empty($proxy_list)) { //NOW WE NEED TO CHECK PROXY IS WORKS $SC = new SuperCurl(); $SC->__set('window_size', 200); $SC->init_console(true); $SC->__set("use_useragent_list", true); $SC->load_useragent_list('files/useragent_list.txt'); $SC->__set("use_proxy_list", true); $SC->load_proxy_list($proxy_list, 200, 'http', 'http://ip-check.info/?lang=en', '<title>IP'); $SC->execute(200); $proxy_list = $SC->get_alive_proxy(); $SC->clear_proxy(); $SC->clear_the_parse_list(); unset($SC); } if (!empty($proxy_list)) { $fname = 'files/proxy_list.txt'; $fp2 = fopen($fname, 'w'); ftruncate($fp2, 0);
$url = SEARCH_URL . urlencode($phrs); if ($i >= 10) { $url .= '&start=' . $i; } $parse_list[] = $url; $k++; usleep(1700); } } } if (USE_PROXY) { assignProxy(); } if (!empty($parse_list)) { $SC = new SuperCurl("search_from_google"); $SC->__set('window_size', 100); $SC->init_console(); $SC->__set("use_useragent_list", true); $SC->load_useragent_list('files/useragent_list.txt'); $SC->__set("use_proxy_list", USE_PROXY); $failed_count = 0; $count_live = 0; while ($failed_count < 2 && !empty($parse_list)) { $SC->clear_the_parse_list(); if (USE_PROXY) { $k = 0; while ($count_live < 10 && count($PROXY_USE) > 100 && $k < 10) { shuffle($PROXY_USE); $proxy_temp = array_slice($PROXY_USE, 0, 1000); $SC->clear_proxy_notchecked(); $SC->load_proxy_list($proxy_temp, 10, 'http', 'http://www.google.com.ua/');