判断搜索引擎访问
关键词:判断搜索引擎访问,判断搜索引擎,搜索引擎访问,判断搜索引擎是否访问,搜索引擎访问过我的站
这是一个判断搜索引擎访问的函数
当tf=1 就告诉搜索引擎不要访问,错误,否则自己写吧
Public Function ChkSpider(tf)
Dim ArrSpider,Agent_User,i
'要屏蔽的搜索引擎的标志可以自己在下面加.
ArrSpider=Array("google","baidu","yahoo","sina","sohu","jakarta","httpclient","soso","twiceler")
Agent_User=LCase(Request.ServerVariables("HTTP_USER_AGENT"))
ChkSpider = False
For i = 0 To UBound(ArrSpider)
If InStr(Agent_User,ArrSpider(i)) Then
ChkSpider = True
If tf=1 Then
Response.Clear()
Response.Status = 404
Response.Write "<h1>404 Not Found</h1>"
Response.End
esle
自己写代码吧
End If
Exit Function
End If
Next
End Function
关键词:判断搜索引擎访问,判断搜索引擎,搜索引擎访问,判断搜索引擎是否访问,搜索引擎访问过我的站