从垃圾邮件机器人隐藏电子邮件的有效方法 [英] Effective method to hide email from spam bots

查看:134
本文介绍了从垃圾邮件机器人隐藏电子邮件的有效方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < a href = admin [at] example.com
rel =nofollow
onclick =this.href ='mailto:'+'admin'+'@'+'example.com'>与我联系< / a>

你觉得怎么样?是否有效?你也知道或使用了什么其他方法?

解决方案

这是我使用的方法,服务器端包括例如<! - #include file =emailObfuscator.include - > 其中 emailObfuscator.include 包含以下:

 <! -  // http://lists.evolt.org/archive/Week-of-Mon -20040202 / 154813.html  - > 
< script type =text / javascript>
function gen_mail_to_link(lhs,rhs,subject){
document.write(< a href = \mailto);
document.write(:+ lhs + @);
document.write(rhs +?subject =+ subject +\>+ lhs +@+ rhs +< \ / a>);
}
< / script>

要包含地址,我使用JavaScript:

 < script type =text / javascript> 
gen_mail_to_link('john.doe','example.com','关于你的网站的反馈...');
< / script>
< noscript>
< em>受JavaScript保护的电子邮件地址。激活JavaScript以查看电子邮件。< / em>
< / noscript>

由于自2005年以来我一直通过Gmail收到邮件,垃圾邮件几乎是一个非问题。所以我不能说这个方法有多有效。您可能想阅读此研究 (虽然它很旧)生成了这个图:



>


On my homepage, I'm using this method to hide my email from spam bots:

<a href="admin [at] example.com"
   rel="nofollow"
   onclick="this.href='mailto:' + 'admin' + '@' + 'example.com'">Contact me</a>

What do you think about it? Is it effective? What other methods do you know or use?

解决方案

This is the method I used, with a server-side include, e.g. <!--#include file="emailObfuscator.include" --> where emailObfuscator.include contains the following:

<!-- // http://lists.evolt.org/archive/Week-of-Mon-20040202/154813.html -->
<script type="text/javascript">
    function gen_mail_to_link(lhs,rhs,subject) {
        document.write("<a href=\"mailto");
        document.write(":" + lhs + "@");
        document.write(rhs + "?subject=" + subject + "\">" + lhs + "@" + rhs + "<\/a>");
    }
</script>

To include an address, I use JavaScript:

<script type="text/javascript"> 
    gen_mail_to_link('john.doe','example.com','Feedback about your site...');
</script>
<noscript>
  <em>Email address protected by JavaScript. Activate JavaScript to see the email.</em>
</noscript>

Because I have been getting email via Gmail since 2005, spam is pretty much a non-issue. So, I can't speak of how effective this method is. You might want to read this study (although it's old) that produced this graph:

这篇关于从垃圾邮件机器人隐藏电子邮件的有效方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆