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: 80 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.