Saturday, September 30, 2006

Php Parser

Как пользоваться небуду учить, кому надо сам разберется во всем :)

<?
set_time_limit(0);
set_magic_quotes_runtime(0);
error_reporting(0);

function get_page($n){
$n--;
$n=$n*100;

$sock = fsockopen ("www.google.ru", 80);
fputs ($sock, "GET http://www.google.ru/search?q=inurl:%22viewforum.php%3Ff%3D%22&num=100&hl=ru&lr=&start=$n&sa=N HTTP/1.0\r\nHost: $host\r\n\r\n");
$cont = "";
while (!feof ($sock)) { $cont .= fgets ($sock); }
fclose ($sock);
return $cont;
}

for ($i=1; $i<10000; $i++)
{
$google = get_page($i);
while (strstr($google,"<font color=#008000>"))
{
$n1 = strpos("$google","<font color=#008000>")+20;
$google2=substr($google,$n1,strlen($google)-$n1);
$n2 = strpos($google2,"viewforum");
$url=substr($google2,0,$n2);
$google=substr($google,$n1+20,strlen($google)-$n1-20);
$url = strip_tags($url, "");

$f = fopen('./full.phpbb.txt', 'a+');
if (filesize('./full.phpbb.txt') > 0)
{
$tfile=fread($f,filesize('./full.phpbb.txt'));
}
else { $tfile = ""; }
if (!strstr($tfile,$url))
{
$count++;
fputs($f, "http://$url\n");
echo "<html><body><center>[$count]$url</center></body</html>";
}
fclose($f);
flush();
}
}

?>

1 Comments:

Blogger Unknown said...

Very Nice Blog thanks i like this
SEO Services India

12:41 AM  

Post a Comment

<< Home

Google
 
Web seo-script-archive.blogspot.com