Created
November 16, 2011 14:29
-
-
Save ivuorinen/1370175 to your computer and use it in GitHub Desktop.
rot13 php obfuscation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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>[email protected]</noscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment