obfuscate email addresses

Post Reply
pdd_2003_1

obfuscate email addresses

Post by pdd_2003_1 »

Please can someone tell me of an easy way to obfuscate email addresses so that they cannot be harvested by bots on the Internet?

Is there a feature within PHPMaker?

Or is there some script that can be run that will allow the email address to be displayed so that users can click on it, but it cannot be read properly by any harvesters?

I do not want to have users having to use a CAPTCHA page so that they can access the email address.


bkay
User
Posts: 101

Post by bkay »

+1

Or comments on how to do this effectively in PHPM?


Adam
User
Posts: 480

Post by Adam »

This is a good solution that confuses the leach bots...

function Obscure($string) {
$text = "";
for ($index = 0; $index < strlen($string); $index++) {
$text .= "&#x" . dechex(ord($string[$index])) .";";
}

return $text;

}

echo Obscure("recipient@mailservice.tst");

It works (well, it's always worked for me - even on very high traffic sites) because bots download and scan page source, not rendered content - that means they see a string of html hex elements instead of a text email address that matches their pattern filter, but browsers still see a "normal" email address.


Post Reply