View Full Version : Anti email address theft + Mouse over

01-30-2003, 01:10 AM
I woud first of all like to post this nifty little script to stop robots stealing your email address from your website:

<script LANGUAGE="javascript">

var first = 'ma';
var second = 'il';
var third = 'to:';
var address = 'USERNAME';
var domain = 'HOTMAIL';
var ext = 'COM';
document.write('<a href="');
document.write('Email Me</a>');


All you need to change is the Address, Domain, and Extension.

Secondly, I would like a little help with adapting this code. My problem is that I want to incorporate this code into a mouse over code that exchanges the picture. (see here:Email Test page (http://akhet.port5.com/email.htm), where I have put the two codes on one page but they are not combined properly yet.)

The end result would be a mouse over picture exchange that the visitor can click on to email me and no robots can steal my email address.

Any one know how to combine these two scripts effectively?


01-30-2003, 01:32 AM
It's a bit complicated, isn't it?

Why don't just use something more "friendly" like...

<a href="mailto:jhghj+zxcxz.com" onclick="this.href=this.href.replace('+','@')">mail me</a>

btw, read the Read this before you post a script (http://www.codingforums.com/showthread.php?s=&threadid=1510) thread

01-30-2003, 01:53 AM
Thanks for that Borg.

I had not realised that there was a different set of rules for each string on this board. Perhaps I should move over to the general section.

Is the script that you posted really as effective as the one I posted? I mean, will your stop all robots from stealing your email address?


01-30-2003, 02:15 AM
they will steal a wrong address (that was a simple example, you can mask the address as much as you want), so I think that the final result it's the same, and also you (and a lot of other sites using the same system) can discourage them from using a robot if they end with a large & useless wrong emails database :D

01-30-2003, 02:27 AM
Thanks Borg,

So if I use your code (with a '+' instead of a '@') , the robots will still steal my address and then its simply a matter of the robot's owner inserting missing '@' sign.

That really doesn't sound very secure. Or do you feel that the robot's owner will not be bothered doing this?


"Live simply so that others may simply Live."

01-30-2003, 12:15 PM
as I said it was a simple example: possibilities are endless:

mailto:myemail---@---mydomain---.com (remove all the ---)
mailto:m$y$e$mail$@$mydomain.com (remove the $)
mailto: mydomain.com@myemail (swap domain & email)

and it's still more practic than using an script every time to write the address :)

01-31-2003, 05:00 AM
My point was, that the difference between the script that I posted and all of your examples is this:

* With your examples the owner of the robot can still correct the address and use it to spam me.

* But with my script the robot is unable to recognise it as an email address and therefore the owner has nothing to work with and can not spam me.

Woud you agree with that reasoning? I am not entirely sure if this is how it works so I do appreciate your opinion, thanks.


01-31-2003, 12:13 PM
As you can scramble the address in infinite ways, adding instructions to the robot to figure it out would be a waste of time & resources.

Your solution is secure, sure. But imagine how tedious must be creating a large contact list...

01-31-2003, 01:02 PM
Cool. :thumbsup:

Thanks Borgtex.