有效的方法来隐藏垃圾邮件机器人的电子邮件方法来、垃圾邮件、机器人、电子邮件

2023-09-10 22:30:06 作者:无人伴我以歌

在我的主页,我用这个方法来防止垃圾邮件机器人隐藏我的电子邮件:

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?

推荐答案

这是我用的方法,与服务器端包含,例如: &LT;! - #include文件=emailObfuscator.include - &GT; ,其中 emailObfuscator.include 包含以下内容:

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>

要包括地址,我使用JavaScript:

To include an address, I use JavaScript:

<SCRIPT LANGUAGE="JavaScript" 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>

由于我收到的邮件通过Gmail自2005年以来,垃圾邮件是pretty的多少不是问题。所以,我不能说,如何有效的这种方法。你可能想读this研究(虽然它的老)生成此图:

Because I get mail 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: