AUTOMATIC SEARCH ENGINE AND BOT DETECT SCRIPT PHP
Sometimes we need to detect the bots that acces our web pages.This is important if we have to allow/block some bot (or search engines ) in our site.This php script can do this.The bots list can be found here http://himmera.com/Web/User_agents_list_strings.html ( most important bots) : or here : http://www.himmera.com/Web/Complete_User_agents_list_strings.html ( full bots list ) :
<?
$botarray = array(
"Teoma",
"alexa",
"froogle",
"inktomi",
"looksmart",
"URL_Spider_SQL",
"Firefly",
"NationalDirectory",
"Ask Jeeves",
"TECNOSEEK",
"InfoSeek",
"WebFindBot",
"girafabot",
"crawler",
"Googlebot",
"Scooter",
"Slurp",
"appie",
"FAST",
"WebBug",
"Spade",
"ZyBorg");
foreach($botarray as $botname) {
if(ereg($botname, $HTTP_USER_AGENT)) {
$Message='This is not a Bot named '.$botname.'!';
}
else
{
$Message='This is not a Bot !';
}
}
echo $Message;
?>