iscrawler 相关的软件列表

首页

php 判断访客是否为搜索引擎蜘蛛的函数代码

2020-02-16 标签:php,判断,访客,是否,搜索引擎,蜘蛛,函数,代码,实现,如下,author,eddy,return,bool,function,iscrawler,agent,strtolower,server,http

实现代码如下: /** * 判断是否为搜索引擎蜘蛛 * * @author Eddy * @return bool */ function isCrawler() { $agent= strtolower($_SERVER['HTTP_USER_AGENT']); if (!empty($agent