Page 1 of 1

obfuscate email addresses

Posted: Wed Apr 15, 2009 2:35 pm
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.


Re: obfuscate email addresses

Posted: Mon Dec 24, 2018 4:02 am
by bkay

+1

Or comments on how to do this effectively in PHPM?


Re: obfuscate email addresses

Posted: Tue Jan 08, 2019 11:41 pm
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.