D58SEO

D58站群,泛目录程序,寄生虫程序,蜘蛛池系统

ASP与PHP禁止蜘蛛访问代码

  asp禁止蜘蛛访问代码

function spiderno()
dim agent: agent = lcase(request.servervariables("http_user_agent"))
dim Bot: Bot = ""
if instr(agent, "googlebot") > 0 then Bot = "Google"
if instr(agent, "mediapartners-google") > 0 then Bot = "Google Adsense"
if instr(agent, "baiduspider") > 0 then Bot = "Baidu"
if instr(agent, "sogou spider") > 0 then Bot = "Sogou"
if instr(agent, "yahoo") > 0 then Bot = "Yahoo!"
if instr(agent, "msn") > 0 then Bot = "MSN"
if instr(agent, "ia_archiver") > 0 then Bot = "Alexa"
if instr(agent, "iaarchiver") > 0 then Bot = "Alexa"
if instr(agent, "sohu") > 0 then Bot = "Sohu"
if instr(agent, "sqworm") > 0 then Bot = "AOL"
if instr(agent, "yodaobot") > 0 then Bot = "Yodao"
if instr(agent, "iaskspider") > 0 then Bot = "Iask"
if len(Bot) > 0 then
Response.End()
end if
end function

php禁止蜘蛛访问代码

function spiderno()
{
$useragent = strtolower($_SERVER['HTTP_USER_AGENT']);
if (strpos($useragent, 'googlebot') !== false){
exit();
}
if (strpos($useragent, 'msnbot') !== false){
exit();
}
if (strpos($useragent, 'slurp') !== false){
exit();
}
if (strpos($useragent, 'baiduspider') !== false){
exit();
}
if (strpos($useragent, 'sohu-search') !== false){
exit();
}
if (strpos($useragent, 'lycos') !== false){
exit();
}
if (strpos($useragent, 'robozilla') !== false){
exit();
}


返回首页

D58SEO d58adong

免责声明:本站的所有程序是正规快速建站程序,使用程序其法律责任完全由用户自己承担,和本站无关,使用本程序请遵守国家法律法规!