I’m programming in PHP and would like to create web pages which have email addresses that are easily read by humans but not easily harvested by spammers. The email addresses are coming from user input, and I think I can identify an address by using a regular expression, but I’m not clear exactly how I should replace the email addresses or with what, in order to keep most automated spam bots from harvesting them.
Here’s one idea: (pseudo code)
(email)@(domain.com) $1<span class='remove'>DELETE</span>$2 .remove { display: none; }
Hopefully the bot will trip up on the span tag.
Finally, I’m looking for a solution that will not disturb email addresses that are inside of mailto: tags.
Duplicate of How can I prevent prevent bots from collecting e-mail addresses? which is duplicate of What are some ways to protect emails on websites from spambots? and maybe some others…
You can obfuscate it using CSS as well…
Edit: Here, the email address in the source is in reverse – what the CSS statements does is that it reverts the email address to its original form. I hope that makes sense.
But I am not sure how effective this is – there are many bots who simulate a browser environment. I think I am better of saying something like – my email is binnyva, googlemail.