仅在某些时候以表单形式显示验证码
我有一个用 sf1.4 编码的博客;我在表单中使用验证码 征求意见。有些用户抱怨验证码,但我 不想完全删除它。
例如,是否可以删除验证码,但将其打开 用户发表评论后几分钟?
这样,就不会阻止偶尔的用户发表评论,并且 防止有人自动向网站发送垃圾邮件。
想法?
I have a blog coded in sf1.4; and I use recaptcha in the form
for comments. Some users have complained about the captcha, but I
don't want to remove it completely.
Is it possible to, for instance, remove the captcha, but turn it on
for a few minutes after the user has posted a comment ?
That way, it doesn't discourage occasional users from commenting, and
prevents someone from spamming automatically the website.
Thoughts ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在用户发布一定数量的帖子后在会话中启用它,这些帖子可以是随机的,就像在 2-4 个帖子之后一样?更好的是在每次说
1 + rand(5)
帖子后显示它?跟踪会话中发布的帖子数量应该不难 - 您只需要为每个用户会话保留一个计数器即可。
You can do something like enable it in a session after a user has made some number of posts which can be random as well like after 2-4 posts maybe? Even better display it after every say
1 + rand(5)
posts?Tracking the number of posts made in a session should not be difficult - you just need to keep a counter per user session.