I usually just convert them to HTML entities with a function like this:
function spamProtect ($address) { $address = str_replace("@", "@", $address); $address = str_replace(".", ".", $address); $address = str_replace(":", ":", $address); return $address; }
You can call it with: spamProtect("[EMAIL PROTECTED]") or spamProtect("mailto:[EMAIL PROTECTED]")
But, like Curt said, those dedicated to harvesting e-mail addresses can add further complexity to their e-mail harvesting programs and catch these rather easily.
Ultimately, the best way to keep people from grabbing e-mail addresses is not to display them on your Web site at all. This hurts you if you need a point of contact; however, you could use a form that sends a message to a processing script that then e-mails the message to the intended recipient. The e-mail address would never need to be visible to the browser, and so, the harvesters would never get your address.
-- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php