Estimated reading time: 3 minutes


This article was published more than a year ago, there may have been developments.
Please take this into account.

The satirical cartoon of today, of Randy Glasbergen introduces us to the problem of SPAM, a true scourge of the Internet. In some recent statistics the percentage of spam on all emails sent each day reaches’82%, and it is not difficult to compile statistics on their personal email box. For example, the 21 April I received eight spam emails… and eight email good“. The methane.

The scourge of spam is also due to little control providers “too cheap“, or to laws of some countries too “libertineche non impongono controlli ai provider. Ma a tutto c’è una soluzione, indeed there are several. Qualche tempo fa mi è capitato di dover includere un indirizzo mail in chiaro fra le pagine di un sito. Write the email address clearly equivalent to saying: “sono qui per ricevere SPAM”, so I have documented and the solutions are many.

Form mail con captcha

The form mail are not a recent invention, wrong’introduction of captcha was a turning point that allowed a constant defense against bots and crawlers automatic. In essence it is of some characters visibly altered that can not (or might not) be read by automated bots. Some examples can be found below.

It will then be necessary dell'immagini enter characters in a field, if the characters match the form will be validated, otherwise it will be required the insertion of another captcha.

Necessarily the captcha are processed by some libraries the server, clearly you can not implement a captcha only through HTML (which is a language of pure visualization). There are several PHP scripts for the generation of captcha, for the platform WordPress exist special plugin.

Encode the email link with javascript

Javascript is another programming language that comes to us. A different approach from that captcha requires no PHP It is to code via Javascript. In practice every email address character is converted into a code more complex to decipher the bot, that if well planned can certainly come to head, but the percentage of attack is relatively low. One of these tools is “Antispam email address encoder“, a small JavaScript file that after the email address input to code returns the scrpt to be included in the HTML page.

Look here:  Photography: techniques for the reduction of "Digital Noise"

For example, we try to encode the address ““. The result will be to include this:

<script type="text/javascript">
function obscure(){
C can be,R,And,P,T=
"65766572736528292e6a6f696e282727293b223b ";R='';for(Y ="+
"68;And<T.length;Y   = 2){R =unescape('%'   T.substr(And,2));}";

Without having to download the script, you can in general rare link directly from the form online.


Akismet is one of the most powerful tools to fight SPAM online. Despite this instrument applies to the comments in the blogs, but not to email me seemed equally rational quote. Use only as Akismet ie WordPress plugin. The plugin offers besides the normal protection from SPAM-based blacklist and whitelist also detailed statistics of Comments good“, i SPAM comments unrecognized, i Comments goodrecognized come SPAM.

A little over a year now I manage the blog, and I've never seen a comment “good” locked. Sarà fortuna, It will be a good hoster but the problem I never found. Occasionally it happens that some comment SPAM is not recognized, but it is not enough to approve comments and mark them as spam to help Sharpening the service offered by Akismet.

I always recommend the use of Akismet, a plugin is very light but accurate, requires no specific configuration and protects us from all the crap that sometimes are caught in the comments.


All these methods are relatively simple to implement, do not require special technical skills and improve the web experience of our visitors. I forgot to mention that it may also implement all simultaneously.


I keep this blog as a hobby by 2009. I am passionate about graphic, technology, software Open Source. Among my articles will be easy to find music, and some personal thoughts, but I prefer the direct line of the blog mainly to technology. For more information contact me.


TheJoe · 22 April 2011 at 1:19 PM

Purtroppo è così.. prima o poi ti prenderà! 😀

davideatflickr · 22 April 2011 at 10:56 AM

dalla spam non si scappa 😀

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.