This is another post about the fight against bots. This time it is email-address-harvesting bots that I'm worried about.

Here are five of the variety of techniques employed to obscure email addresses.

  1. Put the address in an image
  2. Add characters to the address
  3. Put the address in separate table cells
  4. Put the address in discrete, unordered tags.
  5. Use javascript to insert the address into the document

Technique 1 will fool most bots, but it makes it more cumbersome to send an email, since the user can't copy and paste.

Using technique 1 you could create the image by hand, if there were only a small number of addresses, and a change of address was rare. But if you had many addresses, say from registered users, then you would have to use programmatic image creation tools. PHP offers good support for this sort of thing. You can install the python imaging library to do the same stuff in python. And other languages probably have similar capabilities. Example:
joe@example.com

Technique 2 is used in the comments of the php.net site. While this is a fairly safe method for displaying your address on a public site, it is not immune to a intelligently designed bot. I would think of some original formatting before posting my address like this. Example:

joe at example dot com

Technique 3 is simple to use and probably escapes detection by simple bots. But even marginally intelligent bots will strip the html tags from a page.
joe@example.com

Technique 4 is a more effective alternative to using tables. The idea is to construct elements that do not appear in the correct order in the markup, but then use CSS positioning to put them in the correct order.

This technique will fall under the radar of most bots. However, this technique generally breaks copy and paste. Example:

@example.comjoe


Technique 5 will escape detection by all but the most advanced bots. Because bots look at a web page as static text, they will not be able to detect changes javascript makes to the document. And if you require user interaction like mouse over, it makes it doubly safe. However, this technique will not work for browsers without proper javascript support. Example:

After writing this I did a Google search and found A more thorough take by Sarven Capadisli