Click here for a live demonstration

<%@ Language=VBScript %> <% ' Domain-based Anti Email Spider Spam ' Ben Meghreblian 24th Feb 2003 ' Updated: 3rd June 2006 - Added autodetection of domain name ' benmeg at benmeg dot com / http://benmeg.com/code/asp/anti.email.spider.spam.html ' ' This script allows webmasters with a domain name to generate a unique mailto: link that ' contains the visitor's IP, along with Date and Time, meaning that any spiders who ' grab the address will incriminate themselves and allow easy blocking/dropping/filtering ' from the user's side. ' ' It assumes you want the date format in UK format i.e. DDMMYYYY, but is easy to change. ' All that needs changing is your mailto: links updating to be a simple HREF pointing to this file. myDomain = Request.ServerVariables("SERVER_NAME") If Request.ServerVariables("HTTP_X_FORWARDED_FOR") <> "" Then
strIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")

ElseIf Request.ServerVariables("HTTP_CLIENT_IP") <> "" Then
strIPAddress = Request.ServerVariables("HTTP_CLIENT_IP")

ElseIf Request.ServerVariables("REMOTE_ADDR") <> "" Then
strIPAddress = Request.ServerVariables("REMOTE_ADDR")
End If ' Create date part of address CurrentDay = Day( Now() )
If Len( CurrentDay ) = 1 Then CurrentDay = "0" & CurrentDay CurrentMonth = Month( Now() )
If Len( CurrentMonth ) = 1 Then CurrentMonth = "0" & CurrentMonth CurrentYear = Year( Now() )
CurrentDate = CurrentDay & "-" & CurrentMonth & "-" & CurrentYear ' Create time part of address CurrentHour = Hour( Now() )
If Len( CurrentHour ) = 1 Then CurrentHour = "0" & CurrentHour CurrentMinute = Minute( Now() )
If Len( CurrentMinute ) = 1 Then CurrentMinute = "0" & CurrentMinute CurrentTime = CurrentHour & "-" & CurrentMinute Response.Redirect "mailto:" & strIPAddress & "_" & CurrentTime & "_" & CurrentDate & "@" & myDomain
%>