Prevent voting twice
Moderator: General Moderators
-
scarface222
- Forum Contributor
- Posts: 354
- Joined: Thu Mar 26, 2009 8:16 pm
Prevent voting twice
Hey guys quick question. I was wondering if anyone had a suggestion on how to prevent users voting twice on my vote script. I am not really sure what the best method to use is. Would it be better to try to use cookies or some kind of session variable? IF anyone has any advice I would really appreciate it.
Re: Prevent voting twice
Why reinvent the wheel. There are several open source polling and survey packages available. At the very least take a look at their methods and copy then if you insist on rolling your own.
Re: Prevent voting twice
Really, the only semi-perfect solution is to track IP addresses. You can store them in a table permanently or cache them for a period of time in Memcache or similar. Of course, if the users are logged in, the best method is to simply check if the user has voted or not yet.
Sessions and Cookies are useless because one could simply write an automated voting algorithm that ignores session data.
Sessions and Cookies are useless because one could simply write an automated voting algorithm that ignores session data.