Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display an email address for users but hide from robot? Is there a simply way to do it using PHP, Javascript or Jquery?

Is there an elegant and easy/simple way to do it using PHP, Javascript or Jquery?

like image 217
Steven Avatar asked Nov 29 '22 19:11

Steven


2 Answers

There are many ways of doing this. We've had som luck obfuscating source via python/javascript. Another simpler favourite is the CSS unicode-bidi technique:

div.contact { unicode-bidi:bidi-override; direction: rtl; }
<div class="contact">moc.rab@oof</div>

Prints out:

[email protected]

like image 56
David Hellsing Avatar answered Dec 05 '22 01:12

David Hellsing


You might want to look into reCAPTCHA Mailhide. It should be easy to use from PHP.

like image 30
jensgram Avatar answered Dec 05 '22 00:12

jensgram