[linux-help] Re: spiders and spam ducking
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Olwë Melwasúl wrote:
> I'm working on a Web site and my people want to avoid crawlers-spammers
> scarfing up email addresses from the Web pages. Any tricks you all know
> about?
>
I've seen this done with a javascript function:
<script language="JavaScript1.2" type="text/javascript">
function nospam(user,domain) {
status="mail" + "to:" + user + "@" + domain;
locationstring = "mail" + "to:" + user + "@" + domain;
window.location = locationstring;
}
</script>
The javascript is called from the email address href:
<a href=" javascript:nospam ('name','domain') ">NAME
<img src="/graphics/atsign.gif" border="0" width="13" height="15"
align="absbottom">
DOMAIN</a>
In this, only the visible @ is a graphic, which can be made to look very much
like the text (you may want to use css to specify what the text looks like.
So, for instance, if you cut/paste from the browser window you pick up the
names but no @. The name and domain are separated in the source file, and
the only '@' that appears in the source file is inside the javascript, where
the adjacent text is meaningless. Still, if you click on the visible email
address, it executes the mailto link, so you're not only showing the email
address, you get the expected mailto behavior.
--
/*
* Tom Hull * thull2 at cox.net * http://www.tomhull.com/
*/
-- This is the linux-help@xxxxxxxxx list. To unsubscribe,
visit http://www.complete.org/cgi-bin/listargate-aclug.cgi
|
|