Safe way to display email address and contact number
Asked Answered
H

3

0

Are there any tips to display a contact telephone number and email on a contact form webpage? I have a contact form on the page, but also want to give people the option of being able to call or email directly. Currently they are displayed in plain text but feel this is insecure and open to bots crawling the site for this kind of info.

Is there a safe way to do it?

Thanks

Howbeit answered 14/10, 2013 at 11:29 Comment(6)
Relevant: superuser.com/questions/235937/… - has examples as well as useful information.Jean
I think you're looking for Nine ways to obfuscate e-mail addresses compared.Crowbar
great links, thanks for the info. Much obliged.Howbeit
Just a thought, I'm loading the contents of the contact form into a div via an ajax request when the user clicks the contact link on the navbar. Therefore will a crawler be able to find the contact information anyway as it doesnt appear in the source code of the site per se...Howbeit
I love the <span class="codedirection">moc.etalllit@7raboofnavlis</span>Pinzler
I've gone with the display:none method. Seems to work perfect. Thanks all.Howbeit
D
4

Here is one way to do it using Javascript:

<script language=JavaScript type="text/javascript">
<!--
var user = "yourname";
var host = "yourdomain.com";
var link = user + "@" + host;
document.write("<a hre" + "f=mai" + "lto:" + user + "@" + host + "><b>" + link + "</b></a>");
--> </script>
Duggan answered 14/10, 2013 at 13:14 Comment(0)
W
2

You can use a captcha before showing the details.

For example, The email address in this person's resume has a clickable link that pops up a captcha before displaying the full email.

Wailoo answered 14/10, 2013 at 11:52 Comment(0)
S
0

May be show it as a picture? with gd, for example

Shaitan answered 14/10, 2013 at 11:35 Comment(2)
What about the usability/accessibility issues this introduces... copy/paste are basic functions people expect when confronted with what they see as "textual information". People with screen-readers can't read the information without a plain-text alt tag. Bad idea.Jean
@FDL , agree, but question is "Safe way", not "Usability"; I think some bots can run js, and they will see obfuscated email. Also, another way is to show contact info only if user is authorized. Bit this way is isomorph of Show-with-captcha-word way.Shaitan

© 2022 - 2024 — McMap. All rights reserved.