Safe way to display email address and contact number

风格不统一 提交于 2019-12-31 05:44:13

问题


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


回答1:


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>



回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/19359202/safe-way-to-display-email-address-and-contact-number

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!