Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Need to add this code to my website to hide my email from spam bots

Reply
Thread Tools

Need to add this code to my website to hide my email from spam bots

 
 
fb3003@gmail.com
Guest
Posts: n/a
 
      06-24-2006
how can i add this code:

<script language=javascript>
<!--
var username = "fb3003";
var hostname = "gmail.com";
var linktext = "Click Here To Send Me Email";
document.write("<a href=" + "mail" + "to:" + username +
"@" + hostname + ">" + linktext + "</a>")
//-->
</script>

to replace http://www.velocityreviews.com/forums/(E-Mail Removed) in this line:


<td width="100%" bgcolor="#FFFFFF"><font face="Arial"><small><p
align="right"></small></font><a href="index.htm"
onMouseOver="imgAct('img5')" onMouseOut="imgInact('img5')"><img
name="img5" src="home.gif" alt="Click for - Home" border="0" width="31"
height="30"></a><a onMouseOver="imgAct('img6')"
onMouseOut="imgInact('img6')" href="(E-Mail Removed)"><img
name="img6" src="mail.gif" alt="Click to - Send us an Email" border="0"
width="40" height="30"></a><a href="http://www.yahoo.com"
onMouseOver="imgAct('img7')" onMouseOut="imgInact('img7')"><img
name="img7" src="search.gif" alt="Click to - Perform an Internet
Search" border="0" width="31" height="30"></a></td>

basically, I have an envelope picture and when the mouse goes over it,
it change color and you can click on it, and send an email. I am
getting tons of spam, so I got the javascript code from this website
http://www.virtuallyignorant.com/fightspam.htm , hoping that I can
use a version of it, so that I can still use the envelope and mouse
over option.

Any help is greatly appreciated.
Thanks

 
Reply With Quote
 
 
 
 
Danny
Guest
Posts: n/a
 
      06-24-2006

Instead of using ol' document.write(), try ->
<script type="text/javascript">
<!--
function STUFF() {
var username = "fb3003";
var hostname = "gmail.com";
var linktext = "Click Here To Send Me Email";
return "\m\a\i\l" + "\t\o:" + username +"@" + hostname +
">"+linktext;
}
//-->
</script>


<a .... href="javascript:STUFF()">
 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      06-24-2006
Danny said the following on 6/24/2006 12:05 AM:
> Instead of using ol' document.write(), try ->


And then do what is typically recommended of code from Danny, ditch it
and forget you ever saw the garbage as that is what that code was.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      06-24-2006
Danny <(E-Mail Removed)> writes:

> Instead of using ol' document.write(), try ->
> <script type="text/javascript">
> <!--
> function STUFF() {
> var username = "fb3003";
> var hostname = "gmail.com";
> var linktext = "Click Here To Send Me Email";
> return "\m\a\i\l" + "\t\o:" + username +"@" + hostname +
> ">"+linktext;
> }
> //-->
> </script>
> <a .... href="javascript:STUFF()">


This fails, badly.
The javascript:-href will not magically turn into a mailto:-url
when it's executed. Instead the page will be replaced by the return
value of the STUFF function, i.e., "mail o:...>Click Here...".
(yes,"\t" is the tab character).

/L
--
Lasse Reichstein Nielsen - (E-Mail Removed)
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
jojo
Guest
Posts: n/a
 
      06-27-2006
(E-Mail Removed) schrieb:
> how can i add this code:
>
> <script language=javascript>
> <!--
> var username = "fb3003";
> var hostname = "gmail.com";
> var linktext = "Click Here To Send Me Email";
> document.write("<a href=" + "mail" + "to:" + username +
> "@" + hostname + ">" + linktext + "</a>")
> //-->
> </script>
>
> to replace (E-Mail Removed) in this line:
>
>
> <td width="100%" bgcolor="#FFFFFF"><font face="Arial"><small><p
> align="right"></small></font><a href="index.htm"
> onMouseOver="imgAct('img5')" onMouseOut="imgInact('img5')"><img
> name="img5" src="home.gif" alt="Click for - Home" border="0" width="31"
> height="30"></a><a onMouseOver="imgAct('img6')"
> onMouseOut="imgInact('img6')" href="(E-Mail Removed)"><img
> name="img6" src="mail.gif" alt="Click to - Send us an Email" border="0"
> width="40" height="30"></a><a href="http://www.yahoo.com"
> onMouseOver="imgAct('img7')" onMouseOut="imgInact('img7')"><img
> name="img7" src="search.gif" alt="Click to - Perform an Internet
> Search" border="0" width="31" height="30"></a></td>
>
> basically, I have an envelope picture and when the mouse goes over it,
> it change color and you can click on it, and send an email. I am
> getting tons of spam, so I got the javascript code from this website
> http://www.virtuallyignorant.com/fightspam.htm , hoping that I can
> use a version of it, so that I can still use the envelope and mouse
> over option.
>
> Any help is greatly appreciated.
> Thanks
>


You can leave out the JavaScript and crypt your E-Mail...

http://www.oraab.de/php4/crypt.php4
 
Reply With Quote
 
Jeremy
Guest
Posts: n/a
 
      06-27-2006
(E-Mail Removed) wrote:
> Any help is greatly appreciated.
> Thanks
>


First, if you're already getting lots of spam, it's too late for you.
You're on their lists. Removing the e-mail address now is not going to
get you off the lists.

Second, doing this with javascript is a pretty bad idea. You might try
replacing some or all of the characters in the <mailto:> url with their
URL-encoded escape codes - i.e. replacing @ with %40. Not sure if this
will faze the bots, but it's worth a try.

In any case, javascript is probably not the answer, and document.write
*certainly* is not.

Jeremy
 
Reply With Quote
 
Richard Cornford
Guest
Posts: n/a
 
      06-29-2006
Philip wrote:
<snip>
> I've been testing this with some spamtrap email addresses,
> and it appears to work quite well (but not perfectly).

<snip>

So it doesn't occur to you that the software used by spammers will
evolve to be the most effective for the task? As soon as you admit that
what you are doing is not perfect you are admitting that their exist
e-mail address gathering techniques that are significantly superior to
those currently in common use. Give it time and those techniques will be
the ones in common use so all you may be doing by taking an approach
that 'mostly works' at present is guaranteeing yourself future
maintenance work to mitigate for the changing nature of the e-mail
address extracting software.

Richard.


 
Reply With Quote
 
Richard Cornford
Guest
Posts: n/a
 
      06-30-2006
Philip wrote:
> Richard Cornford wrote:


>> Philip wrote:
>> <snip>
>>> I've been testing this with some spamtrap email addresses,
>>> and it appears to work quite well (but not perfectly).

>><snip>
>>
>> So it doesn't occur to you that the software used by spammers will
>> evolve to be the most effective for the task? ...

<snip>

> I disagree. I think spammers are after the low-hanging
> fruit that is unobfuscated email addresses, and there
> doesn't seem to be a shortage of that now or in the
> foreseeable future.


You don't see this thread as being an indication in itself that your
'low-hanging fruit' is already trying to move out of reach?

> You're right that spam harvesting programs could
> conceivably evolve to handle obfuscated addresses,
> but I see very little pressure for them to do so.


They already exist, they just are not yet in common use. Your own
qualification of "but not perfectly" suggests that some are already
defeating your e-mail address obfuscation. So the 'evolution' does not
have to be in the software for the task, just in the choice of software
that people use for the task.

> If you disagree, that's your opinion and I'm not going
> to try to tell you it's wrong. But one thing is for sure:
> right now, obfuscating one's email address will foil more
> email harvesters than not obfuscating.


What I am saying is that what may be true "right now" may not be true
next year. So if you can address the problems you may have next year
with the same effort now as you are spending on implementing a technique
that can be defeated it makes more sense to do that now.

> I believe (and am trying to assemble real data to so I
> can rely on something besides intuition here) that using a
> Javascript-based method is more secure than simple
> obfuscation, even allowing for evolution of email
> harvesting programs. I think it is unlikely that email
> harvesters will ever develop the ability to interpret
> Javascript,


The e-mail harvesters that are based upon automating the Microsoft web
browser COM object (Internet Explorer) can already interpret and execute
javascript (well, technically JScript).

> not because it is too difficult to do but because it would
> be resource-intensive, a little dangerous, and would
> have a very low ROI.

<snip>

It has already been done, would not take more than a week's work to do
again, and once written could be employed by thousands of individuals
(if made available). That is not too much investment, so the return is
proportional to the number of people trying to use javascript to obscure
their e-mail addresses.

Richard.


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding email address from spam bots patrick j HTML 38 03-11-2007 01:47 AM
Need to add this code to my website to hide my email from spam bots fb3003@gmail.com HTML 8 06-30-2006 04:49 AM
Email addresses on JPG to foil spam bots Martin Computer Support 8 09-25-2003 12:23 AM



Advertisments