You are not logged in Log in Join
You are here: Home » Members » jmeile » How to Stop the Spam-bots! » howto_view

Log in
Name

Password

 

How to Stop the Spam-bots!

 

Created by jmeile . Last modified 2006-09-08 11:24:32.

This script encrypts your email address, so it's not readable by the spam bots.

I just get this code from http://www.happysnax.com.au/testemail.php and converted it to python with the authorization of its autor Jeff Robson.

A shorter python alternative, which doesn't use javascript, can be found here:
Re: Simple way to obfuscate email addresses to foil spambots?. Message from mail.zope.org

What can it do? It just hides the email addresses on your webpages from the spamboots, programs similar to the search engines wich get the email addresses on a webpage and send them to someone who sells them to the spam companies.

For example, if you make a view source of this page, you won't see my real email address:


You will see this:

<script language="JavaScript">eval(unescape('%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%27%3C%61%20%68%72%65%66%3D%22%6D%61%69%6C%74%6F%3A%6A%6D%65%69%6C%65%40%68%6F%74%6D%61%69%6C%2E%63%6F%6D%22%3E%6A%6D%65%69%6C%65%40%68%6F%74%6D%61%69%6C%2E%63%6F%6D%3C%2F%61%3E%27%29'))</script>

What do you have to do? You just have to add the following methods to your Extensions folder in a file called email_encoder.py:





Finally, you have to create an external method called encode.

Issues:

  • I don't know why, but when you use it with Netscape 4.x and Zope it doesn't work. But if you try it on its javascript version, it works. I guess it's related with Zope. Does somebody know how can it be solved? Feel free to contact me.

Credits:

Thanks to Holger Lehmann for his peace of code to replace the old to_hex funcion.

If there is a bug or something is missing, please let me now:
Here you'll find more how-tos and products I've published.