- /**
- * Determine whether the source search engine or real user
- * Site bbs.it-home.org
- */
- function Is_bot ()
- {
- /* This function would check whether the visitor is a search engine robot */
- Expand this array as needed
- $botlist = Array ("Teoma", "Alexa", "Froogle", "Gigabot", "Inktomi",
- "LookSmart", "Url_spider_sql", "Firefly", "Nationaldirectory",
- "Ask Jeeves", "Tecnoseek", "InfoSeek", "Webfindbot", "Girafabot",
- "Crawler", "bbs.it-home.org", "Googlebot", "Scooter", "slurp",
- "MSNBot", "Appie", "FAST", "Webbug", "Spade", "zyborg", "Rabaz",
- "Baiduspider", "Feedfetcher-google", "Technoratisnoop", "Rankivabot",
- "Mediapartners-google", "Sogou web Spider", "Webalta Crawler", "Tweetmemebot",
- "Butterfly", "Twitturls", "Me.dium", "Twiceler");
- foreach ($botlist as $bot)
- {
- if (Strpos ($_server[' http_user_agent '), $bot)!==false)
- return true; is a bot
- }
- return false; Not a bot
- }
- ?>
Copy Code |