验证用户投票一次的民意调查
创建公共投票。如何验证用户只投票一次。我尝试使用 IP 地址,但有些组织使用 1 个 IP 地址。
Creating a public poll.how do you validate that the user only vote once.I tried using an IP address but some organizations use 1 IP address.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是 100% 的解决方案,但您可以将浏览器指纹与 IP 地址结合使用。请参阅此网站了解一些可用且易于获取的浏览器属性。
缺点:有些人可能会被排除在外(特别是在具有非常严格的限制且因此基础设施同质的大型组织中),其他人可能会投票两次,例如通过使用不同的浏览器。
如果你想要一个 95% 的解决方案,你必须要求人们使用他们的电子邮件地址进行注册,并通过点击嵌入的链接来证明他们收到了电子邮件,但取决于他们对投票的兴趣有多大,这可能会吓跑很多人潜在选民。
据我所知,这个问题不存在 100% 的解决方案。
编辑:如果您不太关心人们玩弄投票系统(只需编写一个忽略您发送的 cookie 的自动投票器),那么 Cookie 是另一个明显的选择。
It's no 100% solution, but you can use a browser fingerprint in combination with the IP adress. See this site for some usable and easily gettable browser properties.
Disadvantages: Some people may be left out (especially in large organizations with a very restrictive and thus homogeneous infrastructure), others may vote twice, for example by using different browsers.
If you want a 95% solution you have to require people to sign up with their email adress and proving that they received the email by klicking an embedded link, but depending on how much interest they take in voting, it may scare off a lot of potential voters.
A 100% solution for this problem does not exist, as far as I'm aware of.
Edit: Cookies are another obvious choice if you don't care too much about people gaming the poll system (just writing an auto-voter that ignores the cookies you send it).