Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 11-01-2005, 07:27 PM   #1
It can never be too quiet
 
Stryker's Avatar
 
Join Date: May 2004
Location: Burlington, Ontario
Posts: 1,090
Javascript to Fool E-mail Harvesters?

Hiya folks,

I'm not what you would call "in the know" when it comes to mail harvesters/spam bots. I have just a quick question about prevention...

Would a script like the sample below be effective in stopping harvesters from finding my e-mail address on a site? I'm assuming the harvesters would look through source code to find an e-mail address, and there would not be an e-mail address in the source code where this little script was used. Only rendered on the page once read by the browser.

PHP Code:
<script language="javascript">
    var 
firstpart   "myname";
    var 
secondpart  "@mydomain";
    var 
thirdpart   ".blah";
    var 
fourthpart  "Here is the subject too";

    
document.write("<a href='mailto:" firstpart secondpart thirdpart "?subject=" fourthpart "'>Send E-mail</a>");
</script> 
DISPLAYED AS BELOW WHEN RENDERED ON PAGE...
Code:
Thanks for any feedback,
Stryker
__________________
Athlon XP 2800+ • Asus A7N8X (nVidia Nforce2) • Radeon 9600 Pro 256MB • 2x512MB KVR DDR PC3200 Dual Channel • 120GB Seagate 7200RPM 8MB • 160GB WD 7200RPM 8MB • Liteon DVD±RW DL • AOpen DVD±RW DL • Vantec Ion2 350W PSUSend me your picture for the Member Photo Gallery
Stryker is offline   Reply With Quote
Old 11-01-2005, 07:49 PM   #2
Wx geek
 
blue60007's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 6,638
Well I've heard it can work, but not always, and it may not work with all browsers or if the user turned JS off.

Point is, it should work, but isn't foolproof.
__________________
"It is the way of man to make monsters and it is the nature of monsters to destroy their makers."
blue60007 is offline   Reply With Quote
Old 11-01-2005, 07:58 PM   #3
It can never be too quiet
 
Stryker's Avatar
 
Join Date: May 2004
Location: Burlington, Ontario
Posts: 1,090
Quote:
Originally Posted by blue60007
Well I've heard it can work, but not always, and it may not work with all browsers or if the user turned JS off.
I've checked it with I.E., Firefox, Netscape, Opera and Maxthon. All seem fine, as it's very basic javascript. I plan on using it for now only on the PC Mech Photo Gallery page for a "Submit Your Picture" button. Since the gallery is primarily javascript, if it's disabled the user will have bigger issues than the e-mail link.
Stryker is offline   Reply With Quote
Old 11-02-2005, 04:17 PM   #4
Wx geek
 
blue60007's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 6,638
OH! That's a good point, you should be ok with using javascript then.

Like I said, it's probably not foolproof but should be better than just plastering it in plain HTML.
blue60007 is offline   Reply With Quote
Old 11-02-2005, 07:35 PM   #5
Chop Chop
 
catacon's Avatar
 
Join Date: Jan 2005
Location: St. Louis, MO
Posts: 1,035
Send a message via AIM to catacon Send a message via Yahoo to catacon
Yeah, that should work. Like blue said, not foolproof, but it'll do the job.
catacon is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:59 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2