Forum Moderators: phranque

Message Too Old, No Replies

techniques to avoid email harvesting

         

suzanne

8:59 pm on Jan 26, 2005 (gmt 0)

10+ Year Member



Does anyone have good tips on how to display your email on your Web site but block email harvesters from scraping it? I've been trying to find a good solution to this issue. So far, I've got 3 options:

1.) Display the email in an image
2.) Use javascript to prevent the scrapers from finding it.
3.) Use css to prevent the harvesters from finding it.

I am intrigued by option #2 and #3, but am not certain if these are effective. Anyone out there have any experience with this?

Tks.

Suzanne

kalos

9:29 pm on Jan 26, 2005 (gmt 0)

10+ Year Member



I've used the following javascript before and found it effective. This part is put into the header:

<script type="text/javascript" language="JavaScript">
<!--
var user;
var domain = 'domain';
var suffix = 'com';

function jmail(user)
{
document.write('<a href="' + 'mai' + 'lto:' + user + '@' + domain + '.' + suffix + '">' + user + ' @ ' + domain + '.' + suffix + '</a>');
}
// -->
</script>

And then you place this in as your link:

<span class="lightBlue">Last, First</span><br><script>jmail("username");</script></span>

The span isn't needed, I just used it to differentiate the text for the displayed names.

-ben

pmkpmk

9:36 pm on Jan 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have incorporated option #2 and #3.

The mail-address (for display) is intermingled with invisible-CSS-tags to make it hard to parse. Actually the "@" stands between CSS tags. For a human reader, it's a perfect email address. For the bots its garbage.

If you cut and paste the mailadress, you get human-readable instructions which garbage parts to remove. This requires an IQ slightly above room temperature to follow the instructions.

Finally for those who like to click on the mailadress, a small Javascript comes into play where the actual email adress is encrypted with a secret key. Only the encrypted (garbage-looking) string is visible in the HTML source. The JS decrypts the address on the fly and launches the default email application with the correct address.

While setting this up, we also changed ALL email addresses. The result was pretty impressive - almost no SPAM at all to the new adresses.

What I haven't foreseen though is that some of my users are so dumb as to post their new, spam-free mailaddress into public forums etc...

jo1ene

9:37 pm on Jan 26, 2005 (gmt 0)

10+ Year Member



I use a form which uses a very simple PHP parse script. A lot of people don't have email set up for their browser so this is the best option for them.

justin_s

8:38 pm on Feb 9, 2005 (gmt 0)

10+ Year Member



When I want to hide emails from spiders/bots I use the code below:

<script language="javascript">
document.write("<a href=\"mailto:" + String.fromCharCode(114,101,116,117,114,110,
*115,64,115,97,115,113,117,97,116,99,104,99,111,109,105,99,115,46,99,111,109) + "\">" + String.fromCharCode(114,101,116,117,114,110,
*115,64,115,97,115,113,117,97,116,99,104,99,111,109,105,99,115,46,99,111,109) + "</a>");
</script>
That long string of numbers just represents the various char codes for the entire email string. To create this number list use the code below:

<script language="javascript">
email = new String("testl@test.com");
for (i=0;i<email.length;i++) {
document.write(email.charCodeAt(i) + ",");
}
</script>

Hope this helps.

*- line breaks added to prevent side scrolling

[edited by: tedster at 7:41 pm (utc) on Feb. 19, 2005]

bumpaw

2:19 pm on Feb 19, 2005 (gmt 0)

10+ Year Member



I like the hiveware enkoder which is now hard to find under that name but lives here [automaticlabs.com] at least for now. It creates a big block of javascript for the harvesters.

Reflect

8:57 pm on Feb 23, 2005 (gmt 0)

10+ Year Member



How about uni-encoding? There are several on-line tools. Fantomaster comes to mind. I haven't used it in around 8 months but it worked great for me back then.

Take care,

Brian

bill

2:34 am on Feb 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How about uni-encoding?
I can't find the link now, but I'd read that unicode encoding of e-mail addresses was too easy to break. I had to stop using that on my Chinese sites as all posted addresses were scraped within a few weeks of posting. The hiveware enkoder option has given the best results of late.