Disguise Email Addresses for online publishing
I just wrote this quick ASP code to disguise email addresses on web pages. There is a better way to obfuscate email addresses. I recommend creating an image instead of using text in every case, but sometimes a plain text email address link is effective.
Some losers send spam email for a living, and will send garbage to any email they can find online. Obfuscating email addresses in character codes cloaks them from some of the leeches. There are plenty of websites that will perform the conversion for you, but this morning I decided to create code to automate this task.
Here is an ASP classic function that will convert a string to ASCII characters. PHP code below. These characters will display as normal text to the casual user. The difference between alphabet characters and ASCII characters is that encoded characters must be evaluated before they look like an email address. This thin veil of secrecy is enough to fight off some email harvesting robodicks.
public function asciiDisguise( string )
build = ""
for i=1 to len( string )
build = build & "" & asc( mid( string, i, 1 )) & ";"
next
asciiDisguise = build
end function
I will write a PHP version of this code some time soon and update this post.
UPDATE:
Here is the same function in PHP.
function asciiDisguise( $str ){
$build = "";
for( $i=0;$i<strlen( $str );$i++ ){
$build .= "" . ord( substr( $str, $i, 1 )) . ";";
}
return $build;
}
Comments(3)

[...] am committed to many other old posts, here. I recently updated my hide email code post. This source code helps you publish emails on web pages while shielding the address from most [...]
Dude you have warnings on(?) in a productive state ;)
http://img44.imageshack.us/img44/7229/warning.png
Yes. I am about to switch hosts, and I have neglected to remedy that situation.