Показать сообщение отдельно

  #2227  
Старый 08.03.2008, 02:17
Zircool
Участник форума
Регистрация: 01.03.2006
Сообщений: 169
Провел на форуме:
519496

Репутация: 78
По умолчанию

Piflit спасибо...разобрался все работает..

Цитата:
<?php
Error_Reporting(E_ALL & ~E_NOTICE);
echo "<form method='get'>
Хост:<input type='text' name='host' value='' /><br/>
<input type='submit' name='sub' value='Go!' /><br/>
</form>";


if(isset($_GET['sub']))
{
$img="";
$host=$_GET['host'];
$host=str_replace("/","",$host);
$host=str_replace(">","",$host);
$host=str_replace("<","",$host);
$host=str_replace("%3C","",$host);
$host=str_replace("%3E","",$host);
$sock=@fsockopen("www.be1.ru",80);
if(!$sock) die("fsockopen() error.");
fputs($sock,
"GET /stat/?url=http%3A%2F%2F".$host."%2F HTTP/1.0\r\n".
"Host: www.be1.ru\r\n".
"Referer: http://www.be1.ru\r\n\r\n"
);

while(!feof($sock))
{
$img .= fgets($sock, 1024);
}
$pos = strpos($img, "Google Page Rank");
$got=substr($img,$pos,20);
}

echo "Сайт: $host<br>";
echo $got;
?>
 
Ответить с цитированием