PDA

View Full Version : 'e-Mail me' script



Cheap Bastard
March 25th, 2001, 22:24
i've had too much junk-mail with posting my e-mail addy on my sites... Now that i have a quality e-mail addy (that i can't just change for fun) i don't want it to happen again... Is there any kind of script that could protect my e-mail adress from adress reapers?

(i don't want a FORM Action="mailto:..." because it doesn't really protect it now does it)

(recommendations especially welcome)

Canuckkev
March 25th, 2001, 22:47
Well, this is supposed to work, don't know if it does.

<SCRIPT LANGUAGE="Javascript">
// Change User Name and Domain Name
username="yourname"
at="@"
domainname="emailserver.com"
document.write("<A HREF='mailto:"+username+""+at+""+domainname+"'>"+username+""+at+""+domainname+"</a>")
</script>

But it won't show up to users without Javascript. That's why I prefer formail.

keith
March 25th, 2001, 22:51
maybe cgi?



#!/usr/bin/perl
print "Location: mailto:whoever@whatever.com\n\n";



or php?



<?php header("Location: mailto:whoever@whatever.com"); ?>



haven't tried these, but if that doesn't work, you can use the spam protect at hostedscripts.com

http://pages.hostedscripts.com/spamprotect.html

it's code you put in your page, like <script src="http://www.hostedscripts.com/spamprotect.cgi?user=whatever,whatever.com"></script>

i forget how it read out, but it works.

Koolguy
March 25th, 2001, 23:22
http://www.koolplace.com/other/spam.php

keith
March 25th, 2001, 23:26
don't the spider engines used to find email addresses actually look for the "mailto:" tag? just wondering that if they actually got to that, it might be able to decifer the real address? but hey, what do i know? probably harmless.

Cheap Bastard
March 28th, 2001, 12:53
Cannuck: that's a great idea but javascript isn't necessary for anything else on my site, and about 20% have it turned off (according to thecounter global stats), so i'd rather not do that. (like you said)

keith: i doubt either one of those protects against spider engines. Of course i have no idea, but i think they just look for the mailto: tag, so that'd pretty much be useless... The spamprotect by hostedscripts look fairly good, i might end up using it... Too bad your example shows it uses <script> tags... (isn't that javascript?)

Koolguy: i doubt they're not smart enough to decode it... Besides, perhaps it even shows up like normal to bots...

i'll re-look at cgi.resources.com and hotscripts.com

keith
March 29th, 2001, 21:51
if you're talking about the two mailto: tags in the php or cgi files, then they would not show up. it'd be embedded into the html as a link. such as:

http://www.url.ext/mailme.cgi
or
http://www.url.ext/mailme.php

so no "mailto:" tags would show up to any spider engines.