Protect Email Address From Spam Bots

Protecting your email addresses from spam bots is the thing that you should do after making your web forms using the CAPTCHA verification script. You probably know that spam bots are used to visit your web site pages and extract all email address that can be found there. Usually a regular expression is used to match all email address. Using a simple JavaScript function you can make your email address “invisible” to spam bots but still visible for your web site visitors. I’ve created a JavaScript function that takes 4 parameters and builds a clickable email link.

<script language="javascript">
function emailantispam(email1, email2, email3, email4){
   emailE = email1 + email2 + '@' + email3 + email4;
   document.write('<a href="mailto:' + emailE + '">' + emailE + '</a>')

Now, assume that your email address is When you want to have a clickable email on your web pages you use this:

<a href=""></a>

However, the email address is listed as a plain text and every spam bot can easily find it out. Using the above JavaScript function you can still have a clickable email address on your web page but spam bots will not be able to find it out. All you need to use is:

<script language="javascript">emailantispam('the','coderzone','gma','');</script>
The emailantispam() function will build an email address using the 4 parameters you pass to it.

(P.S : phpjabbers)
Akhil Trivedi