Next →

Stop those spam bots from mining your e-mail address

When I first created this web site I went to a lot of trouble to scramble my e-mail address to prevent spam bots from acquiring it and spamming me. I didn't use the simple approach of replacing "@" with the string " at ". Instead I created a JPEG image of the address with a reasonably obscured background and posted that on my contact page. It's no longer there, but for an example look at my twitter and Facebook addresses.

That was a miserable failure. I couldn't believe how much spam that address got, everything from how to make my penis larger, to how to lose weight, both with just a miracle pill. Then I read an article about how spammers had become more sophisticated, and could decipher such images and parse the address. I must assume that was what happened to me. The next step in the defense is to make the image so obscured the address is almost unreadable. But I did some investigating, and found a more sophisticated approach.


Scramble that address and code

Enter your e-mail address in the form below, then click Scramble. The text area below the buttons will be filled with the html and javascript code for a complete web page that contains nothing but a Send an e-mail button. Skip to the instructions below the form.

Button Attributes:
Scramble Options: Scramble HTML button code Use Alternate Scramble method
Randomize js Variable Names Randomize js Function Names

Next:

  1. Copy the code from the form above and paste it into a text editor like Notepad.
  2. Save the text file with an HTML extension, something like SomeName.html.
  3. Uncomment the 5th line of code that reads:
    <script src="jquery-1.7.2.js" type="text/javascript"></script>
  4. Make sure that a copy of jquery-xxxx.js is in the same folder as the html file.
    If you don't have it, you can get it from the jQuery site.
  5. Make sure the name in the code matches the name of the jQuery file exactly.
  6. Again, save SomeName.html.
  7. Double-click on SomeName.html to open it in your web browser.
  8. Click on the Send an e-mail button, and it will open your default e-mail client with the e-mail address entered in the To field.

Let's examine the code to understand it, and some of the options, a little better.

Next →