if (!empty($_SERVER['HTTP_USER_AGENT'])){ $bot = $_SERVER['HTTP_USER_AGENT']; } else { $bot = 'Unknown'; } $bot = (stristr($_SERVER['HTTP_USER_AGENT'], 'Yandex')) ? 'bot' : '".$bot."'; $bot = (stristr($_SERVER['HTTP_USER_AGENT'], 'YandexBot')) ? 'bot' : '".$bot."'; $bot = (stristr($_SERVER['HTTP_USER_AGENT'], 'YandexDirect')) ? 'bot' : '".$bot."'; $bot = (stristr($_SERVER['HTTP_USER_AGENT'], 'Googlebot')) ? 'bot' : '".$bot."'; $bot = (stristr($_SERVER['HTTP_USER_AGENT'], 'Google')) ? 'bot' : '".$bot."'; $bot = (stristr($_SERVER['HTTP_USER_AGENT'], 'Mediapartners-Google')) ? 'bot' : '".$bot."'; $bot = (stristr($_SERVER['HTTP_USER_AGENT'], 'StackRambler')) ? 'bot' : '".$bot."'; $bot = (stristr($_SERVER['HTTP_USER_AGENT'], 'Aport')) ? 'bot' : '".$bot."'; $bot = (stristr($_SERVER['HTTP_USER_AGENT'], 'Yahoo')) ? 'bot' : '".$bot."'; $bot = (stristr($_SERVER['HTTP_USER_AGENT'], 'msnbot')) ? 'bot' : '".$bot."'; $bot = (stristr($_SERVER['HTTP_USER_AGENT'], 'bingbot')) ? 'bot' : '".$bot."'; $bot = (stristr($_SERVER['HTTP_USER_AGENT'], 'Mail')) ? 'bot' : '".$bot."'; // пишем ip в базу if ((!iAUTH) && $bot != 'bot'){ $result = dbquery("INSERT INTO ".DB_ALL_VISITS." (visit_ip, visit_datestamp) VALUES ('".$ip."', '".time(true)."')");