防止双重投票 [英] Prevent double voting

查看:201
本文介绍了防止双重投票的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个网络应用程序,用户将通过点击竖起大拇指或拇指向投票人员投票,而这些用户将不会在该网站上有任何帐户。



使用最好的技术是什么?是否有必要使用验证码来防范垃圾邮件?



投票数量预计为数百万,只要我获得95%的准确性,该主题不是非常关键那会好的。谢谢。

解决方案

您可以组合这两种方法:




  • 添加Cookie以防止同一台机器上的多个投票

  • 记录IP地址并防止来自同一地址的多次投票(例如,5倍同一小时)



这将使多人可以从同一网络进行投票,但仍可防止过度的作弊。 >

您也可以通过添加一些隐藏的表单域,使用必须包含在投票中的令牌和/或使用Ajax进行投票,来构建投票机器人更困难。我知道构建机器人比较容易,但绝大多数骗子都不那么聪明。


I'm creating a web application where users will vote for some candidates by clicking thumbs up or thumbs down, and these users won't have any account on the site.

What is the best technique to use? Is it necessary to use captcha for more protection from spam?

Vote counts are expected to be millions, and the subject is not very critical as long as I get 95% accuracy that would be fine. Thanks.

解决方案

You can combine these two methods:

  • Add a cookie to prevent multiple votes from the same machine
  • Log IP addresses and prevent voting more than a set number of times from the same address (for example, 5 times the same hour).

This will make it possible for multiple persons to vote from the same network but still prevent excessive cheating.

You may also make it harder to build a voting bot by adding some hidden form field with a token that must be included in the vote, and/or use Ajax for the voting. I know it's relatively easy to build a bot anyway but most cheaters aren't that smart.

这篇关于防止双重投票的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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