Search Tools Links Login

Stop New Spam with ASP


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

Original Author: Teco

Inputs

Input a String

Returns

Returns an ASCII Encoded String

API Declarations

EXAMPLE USE
------------------------
<A HREF="mailto:<%= ASCIICode("a@b.com") %>"><%= ASCIICode("a@b.com") %></A>

Code

Function ASCIICode(strInput)
?á?ástrOutput = ""
?á?áFor i = 1 To Len(strInput)
?á?á?á?ástrOutput = strOutput & "&#" & ASC(Mid(strInput, i, 1)) & ";"
?á?áNext
?á?áASCIICode = strOutPut
End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 102 times

Categories

ASP/ HTML

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.