dmartinezla
11/16/2011 - 2:29 PM

rot13 php obfuscation

rot13 php obfuscation

<script type="text/javascript">document.write(
"<?php
    // We run str_rot13 to email link to conceil it from spam bots
    // then we make it clear for browsers using javascript.
    // If client doesn't have javascript installed, hide css: .ebg13 (= obfuscated .rot13)
    echo str_rot13( "<a class='rot13' href='mailto:" . $email . "'>" . $email . '</a>' );
?>".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));
</script>
<noscript>firstname.lastname@example.com</noscript>