Forum Moderators: phranque

Message Too Old, No Replies

hiding email address in form (hide from email harvesters)

         

jackdack

11:00 am on May 8, 2006 (gmt 0)

10+ Year Member



I want to hide my email address inside forms to prevent email address being collected by email harvesters, Anybody got some code or a link?

thanks

stapel

12:04 am on May 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Most proper form-handling scripts keep the e-mail address out of anything web-viewable. Do a search for secure PHP form scripts; you should be able to find something useful.

(I don't know if we're allowed to make particular recommendations. "Sticky" me if you'd like to know what I'm using.)

Eliz.

MichaelBluejay

8:53 am on May 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There are many ways to thwart spambots, but each has a downside. You will have at least one of the following disadvantages depending on what method you use:

* Address isn't visible
* Address isn't copyable
* Address isn't clickable
* Requires users to understand that something like (at) means @
* Doesn't work if Javascript is turned off
* Address itself must be visible instead of a descriptive link (i.e., no "send us an email")
* Requires either knowledge of CGI programming, or that your webhost provides a canned FormMail script that doesn't require you to put your email address in a hidden Form field.
* User might not get a copy of the message they send

That said, you *must* pick a method and accept the downside, because the downside is not as bad as having the email address you post ruined.

The best methods use Javascript, and nearly all users have Javascript enabled. Even if they don't, you can overcome that by using a noscript tag. (e.g., <noscript>info(at)example.com</noscript>).

Some modern spambots have figured out the typical Javascript trick that's widely used. (paraphrased: a=user, b=domain, document.write(a+'@'+b) ). There are various ways around this, but I don't want to make this post a book. Besides, I've already written a huge article that runs down all the various methods and their pros and cons, but according to forum rules I can't post it here. Search for "bluejay spam" and you'll find it.

Spam is a big problem. Good luck!