%@ Language=VBScript %> <% ' Domain-based Anti Email Spider Spam ' Ben Meghreblian 24th Feb 2003 ' 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 the yourdomain.com entry on the last line, and your mailto: ' links updating to be a simple HREF pointing at this file. yourDomain = 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 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 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 %>
<-- BackThe unique, identifying email address for you would be: <%=strIPAddress & "_" & CurrentTime & "_" & CurrentDate & "@" & yourDomain%>