Poll

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Poll

Post by Shendemiar »

What is the best identifier(s) to deny voting but once.
User avatar
potsed
Forum Commoner
Posts: 50
Joined: Sat Oct 09, 2004 12:00 pm
Location: - South Africa

Post by potsed »

i used an md5 hash of the $_SERVER['HTTP_USER_AGENT'] and the question ..put it into a db that is checked everytime the poll is called.. if the md5 hash is there it shows the results otherwise it shows the poll...


http://www.multebiz.co.za has the poll in the rh column.. it blocks for 24hrs..
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

Thanks, that's just what i needed :D
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

potsed wrote:i used an md5 hash of the $_SERVER['HTTP_USER_AGENT'] and the question ..put it into a db that is checked everytime the poll is called.. if the md5 hash is there it shows the results otherwise it shows the poll...


http://www.multebiz.co.za has the poll in the rh column.. it blocks for 24hrs..
Uhmm.. wont that give the browser used, resulting each different browser-type is allowed one vote?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You probably can't do much more than check the IP address and/or set a cookie. If it's very important people vote only once, make them register and then you can easily check whether that user has already voted.

Mac
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

twigletmac wrote:You probably can't do much more than check the IP address and/or set a cookie. If it's very important people vote only once, make them register and then you can easily check whether that user has already voted.

Mac
No it's not that essential. I propable try to make a long-lasting cookie or session and store the info there.
User avatar
potsed
Forum Commoner
Posts: 50
Joined: Sat Oct 09, 2004 12:00 pm
Location: - South Africa

Post by potsed »

wont that give the browser used, resulting each different browser-type is allowed one vote?
Yes it does but most users only use one browser ... IE (sic) anyway... if its not critical it works...
Post Reply