Last active
May 25, 2018 13:00
-
-
Save eclarrrk/349360b52e8822b69cb6fc499722520f to your computer and use it in GitHub Desktop.
How to obfuscate an email address in PHP
This file contains 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
1. Remove link around email address. | |
2. Wrap email address in <div class="reverse"></div> | |
3. Reverse the email address using strrev() or similar. | |
////////// example code ////////// | |
<div class="reverse"> | |
<?php echo strrev($emailAddress); ?> | |
</div> | |
////////// add to css file ////////// | |
.reverse { | |
unicode-bidi: bidi-override; | |
direction: rtl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment