Просмотр файла bot/write.php

Размер файла: 1.16Kb
<?
if (strstr($_SERVER['HTTP_USER_AGENT'], 'Yandex')){ $bot='Yandex';}
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'Googlebot')){$bot='Google';}
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'Slurp')){$bot='Hot&nbsp;Bot&nbsp;search';}
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'WebCrawler')){$bot='WebCrawler&nbsp;search';}
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'ZyBorg')){$bot='Wisenut&nbsp;search';}
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'google')){$bot='Google';}  
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'scooter')){$bot='AltaVista';}  
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'StackRambler')){$bot='Rambler';}  
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'aport')){$bot='Aport';}  
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'lycos')){$bot='Lycos';}  
else if (strstr($_SERVER['HTTP_USER_AGENT'], 'yahoo')){$bot='Yahoo';}  
if($bot !=""){
$b_data = "bot/bots.dat";
$inf = date("YmdHis",time());
$day = date("d.m.Y",time());
$time = date("H:i",time());
$ip = $REMOTE_ADDR;
$home = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$data = fopen($b_data, "a");
fwrite($data, "$inf|$day|$time|$bot|$ip|$home|\r\n");
fclose($data);
} 
?>