每个IP地址限制1票? [英] Limit 1 vote per IP Address?

查看:121
本文介绍了每个IP地址限制1票?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真正想要的是限制每人1票,但我能想到的下一件好事是限制每个IP地址1票,以防止恶意用户/黑客严重滥用我公司的投票系统.我当时在考虑使用数据库来跟踪IP地址.

What I really want is to limit 1 vote per person but the next best thing i can think of is limit 1 vote per IP address to prevent malicious users/hackers from severely tempering with my company's voting system. I was thinking of using a database to keep track of the IP addresses.

更新: 很抱歉第一次不清楚.我想知道是否限制每个IP地址1票是限制每人1票的好策略.基本上,我想知道1个唯一IP地址是否大致等于1个人.人们已经提到代理和路由器重复使用IP地址,因此很不幸,许多人可以使用相同的IP地址.

Update: Sorry about not being clear in the first time aruond. What i wanted to know if limiting 1 vote per IP address was a good strategy to limiting 1 vote per person. Basically, i wanted to know if 1 unique IP address is roughly equal to 1 person. People have already mentioned that proxies and routers re-use ip addresses so unfortunately, many people can be using the same ip address.

谢谢.我认为,就我而言,最好不要限制每个IP地址1票.

Thanks. I think, for my case, it'll be best to NOT limit 1 vote per ip address.

推荐答案

我建议不要采用IP方法.当我在一些大型ISP大量重复使用IP(AOL ...)之前查看此信息时,但是如果您确实使用IP地址,请使用数据库来跟踪它们.一种快速的方法是使其成为唯一键,并以已投票"的方式捕获异常.

I would suggest not going with the IP approach. When I looked at this before some of your large ISPs reuse IPs a lot (AOL...), but if you do use IP addresses, use a database to track them. A fast way to do it is to make it a unique key and to catch the exception as "already voted".

要添加的一件好事是,不向用户显示他们的投票未计算在内,仅显示结果或感谢他们的投票.如果不给出特定的错误,则更困难,有时甚至没有被您的问题用户所注意到.

One good thing to add is not to show a user that their vote was not counted, just show the results, or thank them for voting. By not giving that specific error, it is harder and sometimes not even noticed by your problem users.

这篇关于每个IP地址限制1票?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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