【发布时间】:2011-04-07 01:13:36
【问题描述】:
我所说的“蜜罐”或多或少是指这种做法:
#Register form
<style>
.hideme{
display:none;
visibility: hidden;
}
</style>
<form action="register.php">
Your email: <input type="text" name="u-email" />
Choose a password: <input type="text" name="passwd" />
<div class="hideme">
Please, leave this field blank: <input type="text" name="email" /> #the comment is for text-browser users
</div>
<input type="submit" value="Register" autocomplete=off />
</form>
//register.php
<?php
if($_POST['email'] != ''){
die("You spammer!");
}
//otherwise, do the form validation and go on.
?>
更多信息here。
显然,真正的字段是用随机哈希命名的,而蜜罐字段可以有垃圾邮件机器人通常填写的不同名称(电子邮件、用户、网站、主页等)。
我喜欢这种技术,因为它不会让用户对 CAPTCHA 感到厌烦。
你们中有人对这种技术有一些经验吗?有效吗?
【问题讨论】:
-
在做这样的事情时要小心你的字段名。那里有多个自动填表工具,一些用来引诱垃圾邮件机器人的东西也可能引诱填表工具。你试试我给的表格,你会称我为垃圾邮件发送者——我不知道我的系统填写了隐藏的“电子邮件”字段。
-
你说得对,我忘了蜜域的
AUTOCOMPLETE=OFF属性;但并非所有浏览器都支持 -
Related : stackoverflow.com/questions/1577918/… 列出了很多 bot/validation 技术,如 CAPTCHA、honey pot、askimet 等。如果您在使用垃圾邮件机器人时遇到问题,绝对值得一读。
标签: php spam spam-prevention honeypot