Home >php教程 >php手册 >PHP判断搜索引擎蜘蛛的代码

PHP判断搜索引擎蜘蛛的代码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-21 08:57:241179browse

if(stripos($str,'msnbot')){ //msn
         return false;
       }
       if(stripos($str,'Googlebot')){ //google
         return false;
       }
       if(stripos($str,'Sosospider')){ //soso
         return false;
       }
       if(stripos($str,'Sogou') && stripos($str,'spider')){ //Sogou
         return false;
       }
       if(stripos($str,'yahoo') && stripos($str,'Slurp')){ //雅虎
         return false;
       }
       if(stripos($str,'YodaoBot')){ //有道
         return false;
       }
       if(stripos($str,'iaskspider')){ //爱问
         return false;
       }



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn