gpt4 book ai didi

php - 在没有 PHP 的情况下保护网络联系表单免受垃圾邮件的侵害?

转载 作者:塔克拉玛干 更新时间:2023-11-03 06:09:50 25 4
gpt4 key购买 nike

我应该为现有的网络联系表单实现某种垃圾邮件保护(验证码等)。但是,原始表单在我无法访问的虚拟服务器上使用了一个 .cgi 文件,因此我无法使用此脚本。PHP 邮件功能已关闭

我猜我需要我自己的 cgi 文件,但我不是很喜欢 perl 和 cgi :-)

也许你可以为我指出一些解决这个问题的方法。

最佳答案

您可以添加否定验证码:

A negative captcha has the exact same purpose as your run-of-the-mill image captcha: To keep bots from submitting forms. Image (“positive”) captchas do this by implementing a step which only humans can do, but bots cannot: read jumbled characters from an image. But this is bad. It creates usability problems, it hurts conversion rates, and it confuses the shit out of lots of people. Why not do it the other way around? Negative captchas create a form that has tasks that only bots can perform, but humans cannot. This has the exact same effect, with (anecdotally) a much lower false positive identification rate when compared with positive captchas. All of this comes without making humans go through any extra trouble to submit the form. It really is win-win. [source].

在您的情况下,您可能最好使用蜜 jar :添加一个新字段:

<div style="position: absolute; left: -2000px;"><input type="text" name="surname"  value="" /></div>

这假设您对接收姓氏不感兴趣。如果有人设法填写并提交该字段,他们很可能是机器人:普通浏览器不会显示该字段:普通用户不会看到它,因此不会填写。

现在,在您的 CGI 脚本中,只需过滤“姓氏”;如果已设置,则停止处理并给出错误,或者就此保留。

或者,如果这不可能,请尝试通过“记录未设置姓氏”来过滤已发布表单的结果。比方说,如果您在 excel/CSV 中获得结果:只需使用 excel 过滤掉具有姓氏的项目。或者使用您的电子邮件过滤器将姓氏:.... 具有值的任何邮件移动到一个特殊目录中。

关于php - 在没有 PHP 的情况下保护网络联系表单免受垃圾邮件的侵害?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8193384/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com