if
(preg_match(
"/(googlebot|baiduspider|sogou|360spider|bingbot)/i"
,
$_SERVER
[
'HTTP_USER_AGENT'
])) {
//是搜索引擎蜘蛛
}
else
{
//普通访客