PDA

View Full Version : Spammers capture my email


keddi
04-16-2003, 07:04 AM
I have my email address throughout my site keddi@... info@... etc and get large amounts of spam to all of the list addresses.

Does anyone know if there some way to have a click-on email link but block the spam programs from collecting the addresses?

Ta:cool:

Pegasus
04-16-2003, 04:50 PM
I use this one.

<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
<!--
var addr1 = "mailto:"
var addr2 = "(Your Name)"
var addr3 = "@"
var addr4 = "(Your email provider.whatever)"
document.write('<A HREF="' + addr1 + addr2 + addr3 + addr4 + '">')
document.write('<img border="0" alt= "Email" SRC="email.gif"><\/a>')
//-->
</SCRIPT>
<BR>Contact Me

If you don't have an image, you can use:

document.write('Contact Me<\/a>')

It's cut down drastically on the amount of spam I'm getting. Just tuck it into the page where you want the email address to go.

Peg

giz
04-16-2003, 05:26 PM
Don't forget the closing </a> tag after the image code. It is missing in the example above.


In order to validate, the closing tag will have to be escaped or broken open as well; either:
"<\/a>" or the alternative of: "</" + "a>"




It also needs alt="some text" with <img> tag.


You can improve the security another notch by URL encoding some of the characters in the email address; like &amp;#41; for the letter A for example.

Pegasus
04-16-2003, 07:35 PM
Ta, Giz. I just copied the code from a stickie, without remembering that there were minor changes that had to be made before it would work properly. All fixed now. I think.

I don't know about using the &#number; coding. I've had it pop up when I convert a document to html and it doesn't always work right on all platforms or browsers. You get these really weird symbols or letters instead of a single or double quote, for example.

Peg

giz
04-17-2003, 02:47 PM
Looks good now.


As for URL encode, I would encode a few characters of the email address, not the HTML code itself; like fr&amp;#45;d@blog&amp;#47;s.com for example.

Pegasus
04-17-2003, 07:27 PM
Would that still work if you put it inside javascript? It would still be recognized as a character, rather than the actual address?

<shrug> I dunno. *g* I don't know that much about javascript.

Peg

giz
04-18-2003, 03:19 PM
Why not try it out?

You can then tell me.

Maria444
09-19-2003, 12:01 PM
Hello guys!

I used Pegasus' code, it comes up fine on the site, but when I click on it, the hotmail message page opens with an extension (address@hotmail.com/start). I tried to send a message, but it never arrived - it bounced back. Well of course, the component "/start" is NOT part of my address. How do I get rid of this /start component? I'm not very familiar with html, should I have included some script on the head section?

Maria444
09-20-2003, 03:22 AM
I struggled for a few hours and although I don't want to brag on re-inventing the wheel, I came up with something that works! At least with hotmail. I actually combined Pegasus' code with another one that I found here on this board. Assuming that my address is "address@hotmail.com" and my sentence "..... if you need to contact me." and that I want the subject to be "Problem", this is the code within the text:

... if you need to <SCRIPT LANGUAGE="JavaScript" type="text/javascript">
<!--
var addr1 = "mailto:"
var addr2 = "add"
var addr3 = "ress"
var addr4 = "@"
var addr5 = "hotmail.com"
var addr6 = "?subject=Problem"
document.write('<A HREF="' + addr1 + addr2 + addr3 + addr4 + addr5 + addr6 + '">')
document.write('contact<\/a>')

//-->
</SCRIPT>
me.

I separated the name into two pieces to fight spam even more.

The word "start", which was added to my address previously and caused the message to bounce back now is automatically added to the subject line, which reads "Problem/start". I don't mind, as long as the message is delivered! Perhaps this is only a hotmail feature.