This code takes a submitted email address/string and converts it to standardized ASCII Character codes, thus blocking bots/spiders from reading your email address, while yet allowing visitors to continue to read and use your proper address via mailto links, etc
Input a String
Returns an ASCII Encoded String
Submitted On | |
By | Teco |
Level | Beginner |
User Rating | 5.0 (45 globes from 9 users) |
Compatibility | ASP (Active Server Pages), HTML |
Category | Strings |
World | ASP / VbScript |
Archive File |
EXAMPLE USE
------------------------
<A HREF="mailto:<%= ASCIICode("a@b.com") %>"><%= ASCIICode("a@b.com") %></A>
Function ASCIICode(strInput)
strOutput = ""
For i = 1 To Len(strInput)
strOutput = strOutput & "&#" & ASC(Mid(strInput, i, 1)) & ";"
Next
ASCIICode = strOutPut
End Function