Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
<?PHP
$bot = 'Unknown';
if (stristr($_SERVER['HTTP_USER_AGENT'], 'Yandex')){ $bot='Yandex';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'YandexBot')){ $bot='YandexBot';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'Yandex')){ $bot='Yandex';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'YandexDirect')){ $bot='Yandex Direct';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'Googlebot')){$bot='Googlebot';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'Google')){$bot='Google';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'Mediapartners-Google')){$bot='Mediapartners-Google (Adsense)';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'Slurp')){$bot='Hot Bot search';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'WebCrawler')){$bot='WebCrawler search';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'ZyBorg')){$bot='Wisenut search';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'scooter')){$bot='AltaVista';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'StackRambler')){$bot='Rambler';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'Aport')){$bot='Aport';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'lycos')){$bot='Lycos';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'Yahoo')){$bot='Yahoo';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'WebAlta')){$bot='WebAlta';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'yahoo')){$bot='Yahoo';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'msnbot')){$bot='msnbot/1.0';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'ia_archiver')){$bot='Alexa search engine';}
else if (stristr($_SERVER['HTTP_USER_AGENT'], 'FAST')){$bot='AllTheWeb';}
if($bot != 'Unknown')
{
$dt=date('Y-m-d [H:i:s]'); // получение текущего времени
$fp = fopen('log.html',a); // получаем дескриптор открытого файла
fwrite($fp,'< br>'.$bot.' | '.$dt); // пишем в лог-файл наши данные
fclose($fp); // закрываем дескриптор
}
?