5月7
上网的时候发现了这段代码,可以记录蜘蛛的来访,其实也很简单,是分析Http_User_Agent中的数据
Function里的代码
Function SpiderBot()
Dim sAgent : sAgent = LCase(Request.ServerVariables("Http_User_Agent"))
Dim sBot : sBot = ""
If Instr(sAgent,"googlebot") > 0 Then sBot = "Google"
If Instr(sAgent,"baiduspider") > 0 Then sBot = "Baidu"
If Instr(sAgent,"sogou.com") > 0 Then sBot = "Sogou"
If Instr(sAgent,"yahoo") > 0 Then sBot = "Yahoo!"
If Instr(sAgent,"msn") > 0 Then sBot = "MSN"
If Instr(sAgent,"ia_archiver") > 0 Then sBot = "Alexa"
If Instr(sAgent,"iaarchiver") > 0 Then sBot = "Alexa"
If Instr(sAgent,"sohu") > 0 Then sBot = "Sohu"
If Instr(sAgent,"Sqworm") > 0 Then sBot = "AOL"
If Len(sBot) > 0 Then
Dim Rs : Set Rs = DB("Select [BotName],[LastDate] From [5U_Bots] Where [BotName]='" & sBot & "'",3)
If Rs.Eof Then Rs.AddNew : Rs(0) = sBot
Rs(1) = Now() : Rs.Update : Rs.Close : Set Rs = Nothing
End If
End Function
调用页面代码
<%
j = 1
Set Rs = DB("Select [BotName],[LastDate] From [5U_Bots] Order By [LastDate] Desc",1)
Do While Not Rs.Eof
j = j + 1
%>
<tr>
<%For i = 1 To 3%>
<%If Not Rs.Eof Then%>
<td><strong><font color=#50691B><%=Rs(0)%></font></strong> <%=IIF(Month(Rs(1))=Month(Date) And Day(Rs(1))=Day(Date),Rs(1) & " <font color=red size=1>New</font>",Rs(1))%></td>
<%Else%>
<td> </td>
<%End If%>
<%If Not Rs.Eof Then Rs.MoveNext%>
<%Next%>
</tr>
<%
If j >=2 Then j = 0
Loop
Rs.Close : Set Rs = Nothing
%>
Function里的代码
Function SpiderBot()
Dim sAgent : sAgent = LCase(Request.ServerVariables("Http_User_Agent"))
Dim sBot : sBot = ""
If Instr(sAgent,"googlebot") > 0 Then sBot = "Google"
If Instr(sAgent,"baiduspider") > 0 Then sBot = "Baidu"
If Instr(sAgent,"sogou.com") > 0 Then sBot = "Sogou"
If Instr(sAgent,"yahoo") > 0 Then sBot = "Yahoo!"
If Instr(sAgent,"msn") > 0 Then sBot = "MSN"
If Instr(sAgent,"ia_archiver") > 0 Then sBot = "Alexa"
If Instr(sAgent,"iaarchiver") > 0 Then sBot = "Alexa"
If Instr(sAgent,"sohu") > 0 Then sBot = "Sohu"
If Instr(sAgent,"Sqworm") > 0 Then sBot = "AOL"
If Len(sBot) > 0 Then
Dim Rs : Set Rs = DB("Select [BotName],[LastDate] From [5U_Bots] Where [BotName]='" & sBot & "'",3)
If Rs.Eof Then Rs.AddNew : Rs(0) = sBot
Rs(1) = Now() : Rs.Update : Rs.Close : Set Rs = Nothing
End If
End Function
调用页面代码
<%
j = 1
Set Rs = DB("Select [BotName],[LastDate] From [5U_Bots] Order By [LastDate] Desc",1)
Do While Not Rs.Eof
j = j + 1
%>
<tr>
<%For i = 1 To 3%>
<%If Not Rs.Eof Then%>
<td><strong><font color=#50691B><%=Rs(0)%></font></strong> <%=IIF(Month(Rs(1))=Month(Date) And Day(Rs(1))=Day(Date),Rs(1) & " <font color=red size=1>New</font>",Rs(1))%></td>
<%Else%>
<td> </td>
<%End If%>
<%If Not Rs.Eof Then Rs.MoveNext%>
<%Next%>
</tr>
<%
If j >=2 Then j = 0
Loop
Rs.Close : Set Rs = Nothing
%>
何为高质量链接?
发个弹窗代码,COOKI


11:06

