zmsj.php:
<?
// 这个文件名为 zsmj.php
// 函数分析 $_SERVER[“HTTP_USER_AGENT”] 信息,如果是搜索机器的特征字,就返回相应的值
// 否则返回 false
// 联系QQ 733905
// email zj#52linux.com (#换成@)
// homepage http://www.52linux.com
// good luck
function 52linux.com_zsmj()
{
$useragent = strtolower($_SERVER[“HTTP_USER_AGENT”]);
if (strpos($useragent, “googlebot”) !== false){
return “Googlebot”;
}
if (strpos($useragent, “msnbot”) !== false){
return “MSNbot”;
}
if (strpos($useragent, “slurp”) !== false){
return
2本文来源gao!daima.com搞$代!码网
搞代gaodaima码“Yahoobot”;
}
if (strpos($useragent, “baiduspider”) !== false){
return “Baiduspider”;
}
if (strpos($useragent, “sohu-search”) !== false){
return “Sohubot”;
}
if (strpos($useragent, “lycos”) !== false){
return “Lycos”;
}
if (strpos($useragent, “robozilla”) !== false){
return “Robozilla”;
}
return false;
}
?>