全球主机交流论坛
标题:
求一个智能判断搜索蜘蛛的代码。
[打印本页]
作者:
小菜鸟
时间:
2011-3-30 12:16
标题:
求一个智能判断搜索蜘蛛的代码。
求代码。
7,8个域名备到一起。
北备,接入商要求网站打不开才行。
站打不开,搜索就全K了。
求一个智能判断搜索蜘蛛的代码。
用户打开网站的话,页面显示空白。
蜘蛛爬的话,网站正常。
直接用<div style="DISPLAY: none"> </div>不会影响蜘蛛收录吧。
作者:
cnweb
时间:
2011-3-30 12:18
厉害
作者:
95147
时间:
2011-3-30 12:21
抄下dz有个叫is_robot的函数
作者:
Poison
时间:
2011-3-30 12:27
DNS智能解析
作者:
小菜鸟
时间:
2011-3-30 12:31
求asp的代码和PHP的代码。
站点有ASP的也有PHP的。
最好是JS调用判断。
作者:
cookie
时间:
2011-3-30 12:32
<?php
function get_bot(){
$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 '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;
}
?>
复制代码
欢迎光临 全球主机交流论坛 (https://loc.1226.eu.org/)
Powered by Discuz! X3.4