Webmaster Forum


Go Back   Webmaster Forum > Marketing Forums > SEO Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

SEO Forum Search engine optimization discussions.

Sponsored Reviews   High Bandwidth Dedicated Servers   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 03-30-2007, 12:44 AM   #1 (permalink)
Banned
 
Join Date: 03-30-07
Posts: 4
iTrader: 0 / 0%
Latest Blog:
None

discussall is liked by many
ASP Version of BOT checker

Saw a PHP equivelent a few posts back and adapted it for ASP, hope people find it useful.

<%
if session("svBot") <> true then
'################################################# #########################
' Version 1.0
' Code should email users when a bot is crawling through a site
' Code tested on IIS 5 only with CDONTS
' Normally stick the code in an include file and then call on home page of web site
' Should execute only first time BOT is found as session is set. Appears to work ok
' Assume that sessions can be used by BOTs!
' Any suggestions and improvements to my rough and ready code gratefully received
' Tim Howes - thowes@ssi-ltd.com - 05/04/2003
'################################################# #########################
' Dim varaibles to be used
varUAGENT = Request.ServerVariables("HTTP_USER_AGENT")
varREFERER = Request.ServerVariables("HTTP_REFERER")
varADDR = left(Request.ServerVariables("Remote_ADDR"), 2)
varIAM = ""
' Search for those BOTS
If instr(varUAGENT,"google") OR instr(varUAGENT,"URL_Spider_SQL") OR instr(varUAGENT,"Firefly") OR instr(varUAGENT,"NationalDirectory") OR instr(varUAGENT,"Ask Jeeves") OR instr(varUAGENT,"TECNOSEEK") OR instr(varUAGENT,"InfoSeek") OR instr(varUAGENT,"WebFindBot") OR instr(varUAGENT,"girafabot") OR instr(varUAGENT,"crawler") OR instr(varUAGENT,"www.galaxy.com") OR instr(varUAGENT,"Googlebot") OR instr(varUAGENT,"Scooter") OR instr(varUAGENT,"Slurp") OR instr(varUAGENT,"appie") OR instr(varUAGENT,"FAST") OR instr(varUAGENT,"fast") OR instr(varUAGENT,"WebBug") OR instr(varUAGENT,"Spade") OR instr(varUAGENT,"ZyBorg") OR instr(varUAGENT,"rabaz") Then
' Determine the google bot
if varADDR = 21 AND instr(varUAGENT,"google") Then
varIAM = "Googlebot"
end if
if varADDR = 64 AND instr(varUAGENT,"google") Then
varIAM = "Freshbot"
end if
' String the info message together
if varREFERER <> "" then
strMessage = "Refer:" & varREFERER & VbCrlf
end if
if varUAGENT <> "" then
strMessage = strMessage & "Agent:" & varUAGENT & VbCrlf
end if
if varIAM <> "" then
strMessage = strMessage & " I am:" & varIAM & VbCrlf
end if
' Send that email
Set usxCDO = Server.CreateObject("CDONTS.NewMail")
usxCDO.From = "bot@yourwebsite.com"
usxCDO.To = "fred@yourwebsite.com"
usxCDO.CC = "wendy@yourwebsite.com"
usxCDO.BCC = "humperdink@yourwebsite.com"
usxCDO.Subject = "A Spider Is Crawling!!!"
usxCDO.Body = strMessage
usxCDO.Send
Set usxCDO = Nothing
End If
' Set session to stop it sending email again and again
session("svBot") = true
End If
%>

Sorry if indentation is missing.....

-------(())------
<mod edit>

Last edited by chicgeek : 03-30-2007 at 08:27 AM. Reason: False signature.
discussall is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 03-30-2007, 08:27 AM   #2 (permalink)
Empress™
 
chicgeek's Avatar
 
Join Date: 08-19-04
Location: York, UK
Posts: 17,963
iTrader: 0 / 0%
Latest Blog:
My Favourite Poem

chicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest orderchicgeek is a web professional of the highest order
Please review the forum rules.
The use of false signatures and advertising is not permitted.
__________________
laura / chicgeek
soprano & web designer
laurakishimoto.ca
chıcgeeĸ @ flickr
chicgeek is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Marketing Forums > SEO Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessibility Checker Vance Web Hosting Forum 2 01-03-2008 03:20 AM
PR Checker ..? Swapna Web Directory Issues 2 08-17-2007 07:53 AM
where i can trade japanese version windows to english version brealmz Computers & Internet 2 06-20-2007 06:27 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 05:17 PM.
© Copyright 2008 V7 Inc