Name:hidingemailinhtml
Created:14-Jul-2007
Modified:60 weeks ago

Hiding Email Addresses

You have a website, and you need to display an email adress, and you want it so spambots don't find it?

Generate an image for the text

It's fairly simple to generate a small image containing the text of the email address. This can be done in gd or imagemagick.

The problem is then you have to store a bunch of dumb images somewhere and obvious problems with text sizing.

Hex Escape

Instead of actually using the letters of the email address, you use the unicode hex equivalent, so:

crap@modp.com

Turns into:

crap@modp.com

Only the dumbest spam bots will be fooled by this

Phonetic Text

I'm sure there is a better name for this but it's changing "@" and "." into their phonetic equivalents, for example "foo [at] modp [dot] com".

This is not completely horrible.

Link to CAPTCHA

The email address is replace with a link "[click to see email]". This would go to CAPTCHA page, where if the can do a little puzzle. The reward being a plain text email address.

This is quite good for the end user, but bad for website owner since they have to deal with with all of infrastructure (database mapping a key to an email address)…. which makes me think….

TinyUrl Variant

I'm sure we've all seen the most excellent http://tinyurl.com/ Interestingly, you can put in any valid url, include mailto ones. You go to this URL tinyurl and it redirects to the mailto and your email app opens up. Interesting but not quite the right behavior since spambots will follow the redirect and then they get the email address.

Div / Pixel Font

Ok this is wacky, but you could convert the text into a "pixel font" made out of divs,  , and colored backgrounds. This has the advantage of using CSS to change colors, or what not.

I'm surprised nobody has done this because it's a great "just because i can" project.

Javascript Insertion

I've used this and well, it's hard to know if this works or not since, you get spam mail anyways. The idea is to call a script that writes out the email. The good part is cut-n-paste with browsers works.

<script type="text/javsascript">
f = function(c) { document.write(c); }
f('c');f('r');f('a');f('p');f('@');
f('m');f('o');f('d');f('p');f('.');
f('c');f('o');f('m');
</script>

There are 50 different ways of writing this.

Conclusion

The problem with all of these, if any of them get any traction, then it's pretty simple to write programs to reverse engineer them. And you have to think that some people spend 100% of their day working on email harvesting. I mean if I was doing this, I'd just have a browser render the page as image/pdf and run it through an OCR reader, THEN use the standard regexps on the resulting plain text.

Secondly, the "googlebot" is looking at javascript. It's not clear exactly what's it doing however.