探索设计与体验的融合
Fusion design exploration and experience
新闻动态
News
好的网络营销公司会给客户提出建设性的意见,善于对客户进行良性引导
您的位置:>> 网站首页 >> 技术文章
如何知道各大搜索引擎什么时候光临您的网站?

    对于企业网站的推广来说,百度、谷歌等搜索引擎的频繁光临,能给各位企业网站管理者带来持续网站更新的动力。如何知道百度、谷歌各搜索引擎的光临呢?本站在此有一段代码,可以记录某些搜索光临的时间。

<%
'搜索蜘蛛

 dim agent
 agent = lcase(request.servervariables("http_user_agent"))
 dim Bot: Bot = ""
 if instr(agent, "googlebot") > 0 then Bot = "Google"
 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
  set rs = server.CreateObject ("adodb.recordset")
  sql="select [Botname],[LastDate] From [Yao_Bots] Where [Botname]='" & Bot & "'"
  rs.open sql,conn,1,3
  if rs.eof and rs.bof then
  rs.AddNew
  rs(0) = Bot
  rs(1) = now()
  else
  rs(1) = now()
  end if
  rs.update
  rs.close: set rs = nothing
 end if

%>

    以上是一段ASP程序,将获得的时间记录于数据库中,番禺网站建设所有客户的网站中,都有此功能,方便大家了解网站对各大搜索引擎的关注度。

相关链接>>
您对此文有什么评论?
类型: 意见建议 内容报错
网友对此文的评论:
未有评论!