Hi everyone,

I have a website where you can vote things up and down. There is no login required to vote and it should register that you have already voted on a particular thing you have already voted on the next time you visit.

It seems to work fine but some times it allows me to vote again on some things. The way I am *trying to* prevent people from voting twice is by logging their IP address and setting a cookie on their computer. I know this isn't the best way to do it, as cookies can be cleared and IP's can be dynamic. So I am asking you if you have ever ran into a similar problem or know another solution to prevent people from voting twice. I want user registration to be a last resort.

Thanks a lot guys,

8 Years
Discussion Span
Last Post by Josh Connerty

The issue with the IP is that every time your router or modem connects to the internet it will get a new IP as most ISP use dynamic IPs.

I would suggest combining these methods, for instance store their IP for a max of 48 hours as the chances are someone else on their ISP's network will end up with their old IP. I would also use hosts and cookies.

This way you can check for any of the following and if they do have anyu of them then they will not be able to vote. As for the cookie issue I would suggest also giving them a session wich will remember them until they close their browser.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.