
07.07.2007, 12:59
|
|
Познавший АНТИЧАТ
Регистрация: 02.05.2006
Сообщений: 1,191
Провел на форуме: 7364332
Репутация:
1276
|
|
Грабим свежие прокся с checker.freeproxy.ru
Писал когда то для себя решил выложить в массы...
PHP код:
$fp = fsockopen("checker.freeproxy.ru", 80, $errno, $errstr, 10);
if ($fp) {
$out = "GET /checker/last_checked_proxies.php HTTP/1.1\r\n";
$out .= "Host: checker.freeproxy.ru\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
$content = '';
while(!feof($fp)) {
$content .= fread($fp,2500);
}
fclose($fp);
$content = str_replace("\n", "@@@", $content);
$content = str_replace("\r\n", "@@@", $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>';
}
}
}
Может код в некоторых местах корявый но работает на славу...
|
|
|