Simple PHP Email Obfuscation
Sep
15
Here’s a simple piece of code that performs PHP based email obfuscation to replace standard characters with an ASCII encoded alternative.
This technique, although simple, will block some of the less intelligent spiders/robots out there. There are many other techniques including using JavaScript to render email address or images or even reversing the email address through CSS, however they all have their pros and cons and remember there isn’t an solution.
<?php
function email_obfuscator( $email )
{
$strArray = str_split( $email );
$obfEmail = '';
foreach( $strArray as $char )
{
$obfEmail .= '&#'.ord( $char );
}
return $obfEmail ;
}
echo '<a href="mailto:'.email_obfuscator('test@test.com').'">'.email_obfuscator('test@test.com').'</a>';
?>
Wow, thanks didn’t know about this one!
hi
nc7sk95nq1odnmyt
good luck
It’s very good article. Great site with very good look and perfect information. I like it too.
It’s very good article. Great site with very good look and perfect information. I like it too.
very nice sites thanks admin…..
It’s very good article. Great site with very good look and perfect information. I like it too
It’s very good article. Great site with very good look and perfect information. I like it too
güvenlik kameraları,kamera,sistemleri,kayıt cihazı,dvr kart,fiyatları,alarm sistemi