$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/'); $count_live = $SC->count_alive_proxy(); $k++; } if ($count_live < 10) { $SC->__set("use_proxy_list", false); } unset($PROXY_USE); } $proxy_list = array_unique($proxy_list); foreach ($parse_list as $key => $prsr_url) { $params = array(CURLOPT_REFERER => "http://" . parse_url($prsr_url, PHP_URL_HOST), CURLOPT_COOKIE => "referrer=http://" . parse_url($prsr_url, PHP_URL_HOST)); //refferer must be the same as site $SC->request($prsr_url, "POST", null, null, $params, $key); }