
28.01.2008, 13:54
|
|
Постоянный
Регистрация: 29.05.2007
Сообщений: 850
Провел на форуме: 4832771
Репутация:
1916
|
|
Насчёт прокси-чекера что ты написал...дык это не чекер а парсер какой-то..
Вот если пригодится парсер проксей с сайта freeproxy.ru, работает 100%
PHP код:
<center><font color="0080ff" size="4" face="Courier New">Список свежих прокси с сайта www.freeproxy.ru</center></font><br><center>
<font face="Tahoma" size="2">
<?
$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>';
}
}
}
?>
</font></center>
|
|
|