|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Hi folks, I am in search of a list of user-agent or IP ranges used by crawlers so that I can exclude them from a hit counter, can anyone point me in the right direction?
Cheers!
__________________
For my first trick watch me turn a zero into a one... |
|
#2
|
||||
|
||||
|
Ok, I found one, seems to be short a couple though...
Use this array to check against the http_user_agent, should be good for asp or php... Code:
Array("Teoma", "alexa", "froogle", "inktomi", "looksmart", "URL_Spider_SQL", "Firefly", "NationalDirectory", "Ask Jeeves", "TECNOSEEK", "InfoSeek", "WebFindBot", "girafabot", "crawler", "www.galaxy.com", "Googlebot", "Scooter", "Slurp", "appie", "FAST", "WebBug", "Spade", "ZyBorg", "rabaz", "msnbot")
Feel free to extend the list! Last edited by Dr_Rock : April 21st, 2008 at 01:45 AM. Reason: forgot msnbot |
|
#3
|
||||
|
||||
|
Last edited by Shadow Wizard : April 22nd, 2008 at 06:59 AM. |
|
#4
|
||||
|
||||
|
Thanks SW, heres my function:
Code:
Private Function IsBot()
Dim arrBotList, intCount, blnIsBot
arrBotList = Array("Teoma", "alexa", "froogle", "inktomi", "looksmart", "URL_Spider_SQL", "Firefly", "NationalDirectory", "Ask Jeeves", "TECNOSEEK", "InfoSeek", "WebFindBot", "girafabot", "crawler", "www.galaxy.com", "Googlebot", "Scooter", "Slurp", "appie", "FAST", "WebBug", "Spade", "ZyBorg", "rabaz", "msnbot", "Gigabot")
blnIsBot = False
for intCount = 0 to Ubound(arrBotList)
If (InStr(Request.ServerVariables("HTTP_USER_AGENT"), arrBotList(intCount))) Then
blnIsBot = True
Exit For
End If
Next
IsBot = blnIsBot
End Function
|
|
#5
|
||||
|
||||
|
cheers, this can be slightly improved though:
Code:
Private Function IsBot()
Dim arrBotList, intCount, blnIsBot
Dim strUserAgent
arrBotList = Array("Teoma", "alexa", "froogle", "inktomi", "looksmart", "URL_Spider_SQL", "Firefly", "NationalDirectory", "Ask Jeeves", "TECNOSEEK", "InfoSeek", "WebFindBot", "girafabot", "crawler", "www.galaxy.com", "Googlebot", "Scooter", "Slurp", "appie", "FAST", "WebBug", "Spade", "ZyBorg", "rabaz", "msnbot", "Gigabot")
blnIsBot = False
strUserAgent = Request.ServerVariables("HTTP_USER_AGENT")
for intCount = 0 to Ubound(arrBotList)
If (InStr(strUserAgent, arrBotList(intCount))) Then
blnIsBot = True
Exit For
End If
Next
IsBot = blnIsBot
End Function
searching the Request.ServerVariables collection will take some CPU cycles, having the same search in loop will waste more than you need.. ![]() |
![]() |
| Viewing: ASP Free Forums > Other > ASP Free Lounge > List of crawlers / bots needed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|