Thread: One Vote per IP
View Single Post
Old 09-24-2012, 10:42 AM   PM User | #8
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,469
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
use the ip as the primary key of a 2-col poll table.

the vote is an integer 0-5 or whatever.

Code:
IP         VOTE
1.1.1.1   4
1.2.1.1   2
1.2.1.1   2
4.2.1.1   0
1.2.9.1   3
i use zero here to 'cancel' a vote for a given ip. looks like #2 is winning...

in this way, someone can update their vote, but they can't vote more times than you can reasonably screen against without sign-in.

yes, they can vote at the coffee shop, on their phone, and at work, but they can't sit there and vote 500 times in a row...
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%

Last edited by rnd me; 09-24-2012 at 10:44 AM..
rnd me is offline   Reply With Quote