Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-12-2008, 04:49 PM   PM User | #1
YaymeQ
Regular Coder

 
YaymeQ's Avatar
 
Join Date: Feb 2008
Location: virginia
Posts: 140
Thanks: 14
Thanked 0 Times in 0 Posts
YaymeQ is an unknown quantity at this point
protect displayed email from spambots?

Hi!
If I want to display an email address on my site, how do I protect it from spambots?
__________________
Where is the "any" key??!
YaymeQ is offline   Reply With Quote
Old 02-12-2008, 04:53 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,614
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
If it’s published on the web as text/HTML there’s no chance to hide it from anyone/anything. You can make it a little harder for spambots (at least the poorly programmed ones) by encrypting the characters with hex entities, though. Or you could put it as image. That will hide it from any non-visual device, though (i.e. won’t be very accessible).
__________________
Don’t click this link!
VIPStephan is online now   Reply With Quote
Old 02-12-2008, 04:57 PM   PM User | #3
YaymeQ
Regular Coder

 
YaymeQ's Avatar
 
Join Date: Feb 2008
Location: virginia
Posts: 140
Thanks: 14
Thanked 0 Times in 0 Posts
YaymeQ is an unknown quantity at this point
what's a hex entity?
__________________
Where is the "any" key??!
YaymeQ is offline   Reply With Quote
Old 02-12-2008, 05:02 PM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,614
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
An HTML entity encoded as hexadecimal number: http://www.ascii.cl/htmlcodes.htm

http://www.katpatuka.org/pub/doc/anti-spam.html
__________________
Don’t click this link!
VIPStephan is online now   Reply With Quote
Old 02-12-2008, 05:09 PM   PM User | #5
YaymeQ
Regular Coder

 
YaymeQ's Avatar
 
Join Date: Feb 2008
Location: virginia
Posts: 140
Thanks: 14
Thanked 0 Times in 0 Posts
YaymeQ is an unknown quantity at this point
Thank you!
__________________
Where is the "any" key??!
YaymeQ is offline   Reply With Quote
Old 02-13-2008, 11:53 AM   PM User | #6
Rohan_Shenoy
New Coder

 
Join Date: Nov 2007
Location: Thane-Vashi,Mumbai,India.
Posts: 44
Thanks: 3
Thanked 2 Times in 2 Posts
Rohan_Shenoy is an unknown quantity at this point
Or instead of putting the entire email as an image, you could just put the @ sign and the dot as a an image!
Rohan_Shenoy is offline   Reply With Quote
Old 02-13-2008, 02:18 PM   PM User | #7
jerry62704
Senior Coder

 
jerry62704's Avatar
 
Join Date: Oct 2007
Location: Springfield, IL
Posts: 1,049
Thanks: 9
Thanked 82 Times in 82 Posts
jerry62704 is on a distinguished road
I heard you could hide it by building it in javascript so they can't scrub the source page code.
jerry62704 is offline   Reply With Quote
Old 02-13-2008, 03:11 PM   PM User | #8
ahallicks
Senior Coder

 
ahallicks's Avatar
 
Join Date: May 2006
Location: Lancaster, UK
Posts: 1,134
Thanks: 1
Thanked 57 Times in 55 Posts
ahallicks is on a distinguished road
I've got two ways on mine, that are supposed to help hide the e-mail from bots... but they are very long-winded!

Edit: But it parses the characters here, dammit! It consists of javascript and hex values, and then a noscript with the same values for those that don't have js enabled
__________________
"write it for FireFox then hack it for IE."
Quote:
Originally Posted by Mhtml View Post
Domains are like women - all the good ones are taken unless you want one from some foreign country.
Reputation is your friend

Development & SEO Tools

Last edited by ahallicks; 02-13-2008 at 03:13 PM..
ahallicks is offline   Reply With Quote
Old 02-13-2008, 03:49 PM   PM User | #9
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,614
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by ahallicks View Post
But it parses the characters here, dammit!
Wrap your stuff in [noparse][/noparse] BB tags.
__________________
Don’t click this link!
VIPStephan is online now   Reply With Quote
Old 02-13-2008, 04:09 PM   PM User | #10
ahallicks
Senior Coder

 
ahallicks's Avatar
 
Join Date: May 2006
Location: Lancaster, UK
Posts: 1,134
Thanks: 1
Thanked 57 Times in 55 Posts
ahallicks is on a distinguished road
Quote:
Originally Posted by VIPStephan View Post
Wrap your stuff in [noparse][/noparse] BB tags.
Tried that one, but still escaped the data... I shall try once again...

Edit: Nope... still displays the actual characters
__________________
"write it for FireFox then hack it for IE."
Quote:
Originally Posted by Mhtml View Post
Domains are like women - all the good ones are taken unless you want one from some foreign country.
Reputation is your friend

Development & SEO Tools
ahallicks is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 07:02 PM.


Advertisement
Log in to turn off these ads.