区别蜘蛛代码(ASP)
[提要] Google 其他蜘蛛:
Google 使用多个 user-agent。您可以在条目的 User-Agent 行中包含漫游器名称来拦截对网页的访问。拦截 Googlebot 将会拦截所有以"Googlebot"开头的漫游器。
<%
function GetBot()
'查询蜘蛛
dim s_agent
GetBot=""
s_agent=Request.ServerVariables("HTTP_USER_AGENT") ‘关键判断语句
if instr(1,s_agent,"googlebot",1) >0 then
GetBot="google"
end if
if instr(1,s_agent,"msnbot",1) >0 then
GetBot="MSN"
end if
if instr(1,s_agent,"slurp",1) >0 then
GetBot="Yahoo"
end if
if instr(1,s_agent,"baiduspider",1) >0 then
GetBot="baidu"
end if
if instr(1,s_agent,"sohu-search",1) >0 then
GetBot="Sohu"
end if
if instr(1,s_agent,"lycos",1) >0 then
GetBot="Lycos"
end if
if instr(1,s_agent,"robozilla",1) >0 then
GetBot="Robozilla"
end if
end function
if GetBot="baidu" then
'给百度定制的内容
elseif GetBot="google" then
'给google定制的内容
end if
%>
Google 其他蜘蛛:
Google 使用多个 user-agent。您可以在条目的 User-Agent 行中包含漫游器名称来拦截对网页的访问。拦截 Googlebot 将会拦截所有以"Googlebot"开头的漫游器。
1.Googlebot:从我们的网站索引和新闻索引中抓取网页
2.Googlebot-Mobile:针对我们的移动索引抓取网页
3.Googlebot-Image:针对我们的图片索引抓取网页
4.Mediapartners-Google:抓取网页确定 AdSense 的内容。只有在您的网站上展示 AdSense 广告的情况下,我们才会使用此漫游器来抓取您的网站。
5.Adsbot-Google:抓取网页来衡量 AdWords 目标网页的质量。只有在您使用 AdWords 为您的网站做广告的情况下,我们才会使用此漫游器。参阅关于此漫游器的更多信息以及如何在您的网站上执行部分拦截。
function GetBot()
'查询蜘蛛
dim s_agent
GetBot=""
s_agent=Request.ServerVariables("HTTP_USER_AGENT") ‘关键判断语句
if instr(1,s_agent,"googlebot",1) >0 then
GetBot="google"
end if
if instr(1,s_agent,"msnbot",1) >0 then
GetBot="MSN"
end if
if instr(1,s_agent,"slurp",1) >0 then
GetBot="Yahoo"
end if
if instr(1,s_agent,"baiduspider",1) >0 then
GetBot="baidu"
end if
if instr(1,s_agent,"sohu-search",1) >0 then
GetBot="Sohu"
end if
if instr(1,s_agent,"lycos",1) >0 then
GetBot="Lycos"
end if
if instr(1,s_agent,"robozilla",1) >0 then
GetBot="Robozilla"
end if
end function
if GetBot="baidu" then
'给百度定制的内容
elseif GetBot="google" then
'给google定制的内容
end if
%>
Google 其他蜘蛛:
Google 使用多个 user-agent。您可以在条目的 User-Agent 行中包含漫游器名称来拦截对网页的访问。拦截 Googlebot 将会拦截所有以"Googlebot"开头的漫游器。
1.Googlebot:从我们的网站索引和新闻索引中抓取网页
2.Googlebot-Mobile:针对我们的移动索引抓取网页
3.Googlebot-Image:针对我们的图片索引抓取网页
4.Mediapartners-Google:抓取网页确定 AdSense 的内容。只有在您的网站上展示 AdSense 广告的情况下,我们才会使用此漫游器来抓取您的网站。
5.Adsbot-Google:抓取网页来衡量 AdWords 目标网页的质量。只有在您使用 AdWords 为您的网站做广告的情况下,我们才会使用此漫游器。参阅关于此漫游器的更多信息以及如何在您的网站上执行部分拦截。
上一篇:页面收录减少,如何检查判断? 下一篇:如何进行关键词定价