PHP voting system with sessions?

Posted by pingu on Stack Overflow See other posts from Stack Overflow or by pingu
Published on 2010-04-21T08:40:07Z Indexed on 2010/04/21 8:43 UTC
Read the original article Hit count: 452

Filed under:
|

Hi guys,

I've been reading up on stackoverflow about creating voting systems in PHP that minimize abuse/multiple voting from the same user, but I haven't come across the answer to my question.

I've got an application where users don't need to register to vote or "like" an entry. Obviously, I want to minimize abuse and I don't want to limit votes per IP address because some organisations (mine included) use shared IP addresses.

I've never used sessions in a non-authenticated system before, but since this application is centered around entry votes I was wondering if this approach would work and whether there were any disadvantages such as performance implications, and whether it's even possible to use sessions in this way:

  • start a session when the website is loaded
  • allow one vote per item per session

If this is a bad idea, my alternative options would be to allow a reasonable number of votes per IP address (say 25), or put a time limit between votes from the same IP address.

What do you guys recommend?

© Stack Overflow or respective owner

Related posts about php

Related posts about voting-system