Web Hosting Talk







View Full Version : How would you handle this voting script problem?


monkey junkie
07-09-2007, 06:56 PM
Hello

I am writing a script where the public (i.e. web surfers) can vote products up or down.

I want to stop people voting the same product up or down multiple times.

The simple (but slightly restrictive) solution I am considering is as follows -

Every time a product gets voted up or down, the IP of the person who did the voting gets added to that products database entry.

Kind of simple. The problems with this are as follows -

In a dynamic IP environment, the user can go offline and back online, and maybe he'll have a new IP, so maybe he can make the same vote again...
In a dynamic IP environment, it's possible "innocent" people will be blocked from voting.I could use a cookie combination to solve 1, but for 2 I don't know...

Can any of you think of a better way to deal with this?

I know no solution is probably fool proof, but I'd like to make it as fair and anti-cheat as possible.

Thanks in advance for any help.

arkin
07-09-2007, 07:03 PM
Make it 1 vote per ip per day.
Link in cookies too.
This seems fair.

monkey junkie
07-09-2007, 07:08 PM
Thanks for the reply.

I was considering some kind of timing issue...

Maybe once per day is too often, but yes, that is a possibility.

azizny
07-10-2007, 07:58 AM
You can never stop someone from voting multiple times if they wanted.

Just check for IP and use cookies.

Peace,

Goldfiles
07-10-2007, 12:26 PM
Ya, that is the best method. I've used a combination of cookies and IP logging in the past, and it gave great results.

ActivI
07-11-2007, 12:17 PM
I've faced this issue several times. The most efficient way is a combination of cookies, ip logging and membership account.

avocado
07-11-2007, 02:35 PM
IP logging can easily block people unfairly. The 30 people in my office are all behind a single public IP, which is not an unusual situation in corporate environments.

plumsauce
07-11-2007, 08:00 PM
1 vote per ip per day

unless your audience comes through the AOL proxies.

mwatkins
07-11-2007, 08:29 PM
Anonymous polling is always a case of trade-offs. If the situation makes it feasible, a "members only" poll can work well.