求一个智能判断搜索蜘蛛的代码。
求代码。7,8个域名备到一起。
北备,接入商要求网站打不开才行。yc005t yc005t
站打不开,搜索就全K了。
求一个智能判断搜索蜘蛛的代码。
用户打开网站的话,页面显示空白。
蜘蛛爬的话,网站正常。
直接用<div style="DISPLAY: none"></div>不会影响蜘蛛收录吧。 厉害 抄下dz有个叫is_robot的函数 DNS智能解析:lol 求asp的代码和PHP的代码。
站点有ASP的也有PHP的。
最好是JS调用判断。 <?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;
}
?>
页:
[1]