Baidu
The user agent of Baidu’s spider will contain the Baiduspider string.
Related information: http://www.baidu.com/search/spider.htm
google
Google’s spider user agent will Contains the Googlebot string.
Related information: http://www.google.com/bot.html
soso
Soso’s spider’s user agent will contain Sosospider String
related information: http://help.soso.com/webspider.htm
sogou
sogou’s spider user agent will Contains Sogou web spider string
Related information: http://www.sogou.com/docs/help/webmasters.htm#07
Others are similar. . . You can check the access log of the website by yourself.
How to control the behavior of spider through php program?
Get the visitor's user agent through $_SERVER["HTTP_USER_AGENT"], then determine whether it contains the specific string of the corresponding search engine spider, and then take subsequent actions.
$user_agent = $_SERVER["HTTP_USER_AGENT"]; if ( eregi("Googlebot",$user_agent) ) { // is google's spider access, you can do something for it~ } ?> |
if ( eregi("Googlebot ",$user_agent) )
http: //www.bkjia.com/PHPjc/364382.htmlTechArticleThe user agent of Baidu’s spider will contain the Baiduspider string. Related information: http://www.baidu.com/search/spider.htm Google Google’s spider user agent will contain Googl...