As we all know spam is a plague that has spread to every far corner of the Internet. Spam-bots collect our email addresses in many ways, but in my opinion the most likely way they’ll get your email address is from scraping webpages such as forums, where you email may be listed. So when you’re building your site and you want to put an “email me” link you should be very careful about doing so. Once the bots find it they’ll start sending you endless offers to buy Viagara an Cialis.
- Download the Email Guard script from Voynex’s site
- Extract the files and upload xmailguard.js to your site, I usually have a directory called “scripts” in the root of each site
- Now you have to type your email links a bit differently, instead of <a href=”mailto:firstname.lastname@example.org”>email@example.com</a> you will have to code your links to <a href=”mail_to_email_at_address.com”>email_at_address.com</a> and when the page loads it will rewrite them for you. If you are using PHP this line will do most of the work for you: $email = str_replace(“@”, “_at_”, $email);
Now your email addresses are safe!