Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Apr 2006
    Posts
    186
    Thanks
    21
    Thanked 6 Times in 6 Posts

    How do you restrict people from voting?

    If I wanted to make a poll (doesn't require registration) that only allows people to vote once, what would be the best way to do it. Is checking by IP the only option? But then people with dynamic IP's would be able to post more than once? Without requiring registration what are some other things you could you do?

  • #2
    Regular Coder
    Join Date
    May 2008
    Location
    Ohio
    Posts
    231
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Always check the IP - it fools enough people that it's worth adding the check. Also try setting a cookie on the user's browser - lots of people aren't clever enough to clear their cookies. You might also consider setting and checking a $_SESSION variable. Depending on what you're implementing, you might require people to register before they can vote.
    zok@zoklet:~$ whereis zok
    zok: http://zoklet.net | http://zoklet.net/otg | /derzok/at/gmail/dot/com

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Cookies and ip are you're only options if you don't want to force registration. Sessions are less useful than useful to you. Cookies tend to be a good option, most people don't even know what they are >.<
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •