当前位置:主页 > 香l港最快开奖直播 >

文章标题:[求助] 找人修改代码

发布时间: 2018-10-26
这句代码不支持360和搜狗的useragent
会改的发消息给我,红包答谢

  1. function checkrobot($useragent = '') {
  2.         static $kw_spiders = array('bot', 'crawl', 'spider' ,'slurp', 'sohu-search', 'lycos', 'robozilla',168图库开奖直播, '360Spider');
  3.         static $kw_browsers = array('msie', 'netscape', 'opera', 'konqueror', 'mozilla');

  4.         $useragent = strtolower(empty($useragent) ? $_SERVER['HTTP_USER_AGENT'] : $useragent);
  5.         if(strpos($useragent, 'http://') === false && dstrpos($useragent, $kw_browsers)) return false;
  6.         if(dstrpos($useragent, $kw_spiders)) return true;
  7.         return false;
  8. }
复制代码