摘要:
/*** 判断是否为搜索引擎蜘蛛** @author Eddy* @return bool*/function isCrawler() { $agent= strtolower($_SERVER['HTTP_USER_AGENT']); if (!empty($agent)) { $spiderSite= array( "TencentTraveler", "Baiduspider+", "BaiduGame", "Googlebot", "msnbot", "Soso 阅读全文
摘要:
得到HTTP_USER_AGENT 的方法很简单,比如php代码:<?php print_r($_SERVER);?><?php print_r($_SERVER['HTTP_USER_AGENT']);?>这两种都可以得到User-Agents和IP等信息,最好配合正则表达式,对信息进行筛选剔除。————– User-Agents列表————-Internet Explorer 6Internet Explorer 7Internet Explorer 8FirefoxChromeSafariNetscapeOperaMaxthon360SEOmniW 阅读全文