I used this procedure once on a web site - It is rather simple, but worked quite well at the time: Stop SpamBots from Harvesting email addresses Using Character Codes in Emil Addresses If you replace at least one alphabetic character on each side of the "@" symbol in all of the e-mail addresses that you list at your site, spambots probably won't be bothered to harvest them and you will notice a huge decrease in the amount of spam that you get. Browsers automatically convert these codes into their corresponding alphabetic characters, so your "mailto:" links will still function properly. e.g.: Replace the letters "a" in mailto:dlambert@xxxxxxxxx so it becomes: mailto:dlambert@iname.com Here are the character codes that you'll need: a a b b c c d d e e f f g g h h i i j j k k l l m m n n o o p p q q r r s s t t u u v v w w x x y y z z You could probably come up with a script to convert ALL the letters in the email addy. -- R. Dave Lambert
From PHP Phrasebook by Wenz (Highly recommend for only $15): <?php function protectMail($s) { $result = ''; $s = 'mailto:' . $s; for ($i = 0; $i < strlen($s); $i++) { $result .= '&#' . ord(substr($s, $i, 1)) . ';'; } return $result; } echo '<a href="' . protectMail('email@xxxxxxxxxx') . '">Send mail</a>'; ?> tedd -- -------------------------------------------------------------------------------- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php