Obi1-Cannabis Posted August 31, 2007 Share Posted August 31, 2007 I need to put a simple page online whith 'in contruction' or something simillar and the email of the client. So what i need to know (not just for this particular case) is. what's the best way to avoid Email Sniffers from getting that email and start filling th email boxes with spam?Big Up Link to comment Share on other sites More sharing options...
aspnetguy Posted August 31, 2007 Share Posted August 31, 2007 do something like this <span id="email">address {at} yourdomain {dot} com</span><script> var email = document.getElementById("email"); email.innerHTML = email.innerHTML.replace("{at}","@").replace("{dot}",".");</script> Link to comment Share on other sites More sharing options...
Obi1-Cannabis Posted August 31, 2007 Author Share Posted August 31, 2007 that's great.Thanks Link to comment Share on other sites More sharing options...
jesh Posted August 31, 2007 Share Posted August 31, 2007 So, what's preventing the creators of the email sniffing bots from looking for "{at}" and "{dot}" and replacing them with "@" and "."?Another solution I've seen is to use entities for the characters. @ is & #64; and . is & #46; So, someone& #64;somewhere& #46;com. But then, again, what's stopping the bot makers from looking for "& #64;" and replacing it with "@"?EDIT: the forum likes to convert the entities to the characters so nevermind the spaces between the & and the #. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 31, 2007 Share Posted August 31, 2007 The best way to do a replacement like that is to use some random string for the @ and the dot instead of something that someone writing a script might look for, and then do the replacement like aspnetguy has. But, someone could also write a script that would evaluate the Javascript and find it that way also. You could also have PHP write the address into an image, but someone could just make a script to read the image and identify the characters in it. The only way to not have an email address harvested is to not post the email address, you would need to use a feedback form that submits to a page that sends the email automatically. Link to comment Share on other sites More sharing options...
croatiankid Posted September 1, 2007 Share Posted September 1, 2007 I would make a form that would send your client the message via a server side programming language (PHP, ASP or Python, IDK what your server supports). That way the email address would never even be shown. Also, I guess you can use an image instead of text. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.