Ejemplo n.º 1
0
        $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);
    $proxystring = implode("\n", $proxy_list);
    fwrite($fp2, $proxystring);
    fclose($fp2);
}
echo 'Proxy list count:<br/>' . count($proxy_list) . '<br>';
Ejemplo n.º 2
0
 $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);
     }
     $SC->execute(10);