Просмотр кода
Название: Парсер прокси листов из freeproxy
Описание: Найдено на просторах интернета
Добавил:
__[_]___
Дата: 23 мар 2018, в 15:12
Комментарии (0)
Описание: Найдено на просторах интернета
<?php
$fp = fsockopen( "checker.freeproxy.ru" ,
80 , $errno, $errstr, 10);
if ($fp) {
$out = "GET /checker/last_checked_proxies.php HTTP/1.1rn" ;
$out .= "Host: checker.freeproxy.rurn" ;
$out .= "Connection: Closernrn" ;
fwrite($fp, $out);
$content = '' ;
while (!feof($fp)) {
$content .= fread($fp, 2500);
}
fclose($fp);
$content = str_replace( "n" ,
"@@@" , $content);
$content = str_replace( "rn" , "@@@" , $content);
}
preg_match_all ( "#(<script> <!--)(.*?)(// --></script>)#si" , $content , $massiv_java);
$count_proxy = count($massiv_java[ '2' ]) -1 ;
if ($count_proxy ) {
for ($i = 0 ; $i <= $count_proxy; $i++) {
$temp_text = $massiv_java[ '2' ][$i];
preg_match_all ( "#(name = ')(.*?)(';)#si" ,$temp_text , $massiv_ip);
$ip = $massiv_ip[ '2' ][ '0' ];
if ($ip) {
preg_match_all ( "#(':' +)(.*?)();)#si" , $temp_text , $massiv_rabot);
$code = $massiv_rabot[ '2' ][ '0' ];
preg_match_all ( "#($code = )(port)(d{1,2})(.*?)(;)#si" , $temp_text , $massiv_rabot);
$port_temp = $massiv_rabot[ '2' ][ '0' ].$massiv_rabot[ '3' ][ '0' ];
$code = $massiv_rabot[ '4' ][ '0' ];
preg_match_all ( "#($port_temp = )(.*?)(;)#si" , $temp_text , $massiv_rabot);
$port_code = $massiv_rabot[ '2' ][ '0' ];
$expression = $port_code.$code;
eval( '$result = ' .$expression. ';' );
echo $insect_proxy = $ip. ':' .$result. '<br>' ;
}
}
}
?>
Добавил:

Дата: 23 мар 2018, в 15:12
