A fork of hanshuo/mailhide2, this project attempts to expand to allow simultaneous implementations of various captchas to reveal emails.
It is implemented in PHP, which means it unfortunately does not work natively on Github Pages alone.
- Sign up for your own reCAPTCHA key from Google. Both regular and invisible keys are supported.
- Replace
<TYPE_RECAPTCHA_PUBLIC_KEY_GOES_HERE>
inemail.html
(email_invisible.html
for invisible reCAPTCHA) and the appropiate secret key inconfig.php
with your own. - Put
email.html
andemail.php
under the same directory on your website. - Include a link to
email.html
in the web page where your masked email address is shown.
A key should be generated per email you wish to protect. These can be added to the config.php file under the array $configEmailAddress.
The format is (per line): 'key' => 'email',
.
Each link will use the same html files, however a query string is used to show which email. This query string has the key "mailKey", and the key should match that in the config.php. So the URL Format should look like: https://example.org/mailhide/email.html?mailKey=EXAMPLEKEY
Sure! I personally use this code for my own emails (though the config is obviously redacted.) You can go try to grab my email at https://www.randalllowe.com/#contact