SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Dec 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Voting system: how can it work?

    I'm basically searching for idea's how to make something like this voting system:

    http://www.musicfrom.nl/player/10929/3065/?uitleg=y

    The user clicks on a link and is able to vote once. Changing IP's should not be possible (using proxies). It should be as strict as possible, so only one vote per pc. Does anyone has an idea how to achieve this in PHP or do I need something else for that security?

  2. #2
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Location
    New Jersey, USA
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The best you can do would be to
    1. require users to create an account. Account creation should require an email address
    2. an account activation code should be sent to the email they provide.
    3. Once the account is activated then allow them to vote.
    4. When someone attempts to vote check their username against your database. if they have already voted then just update their vote. if they haven't already voted then insert their vote and username into your database

    It is still possible to create multiple accounts by using different email addresses. The more personal and verifiable information you collect in the registration process the more secure you can make your voting system. Obviously the more personal information you ask for will make people hesitant to register and will result in less overall use.

    Trying to enforce only one vote by tracking an ip address won't work. I have a different ip address for home, work and my cell phone. Also many people can share the same ip address so you could possibly be preventing hundreds or thousands of people on the same network from voting.

  3. #3
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, welcome to SPF.

    Quote Originally Posted by Punniker View Post
    It should be as strict as possible, so only one vote per pc.
    you cannot ;(

  4. #4
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You could try a cookie as a basic measure, but it is far from foolproof.

  5. #5
    SitePoint Member
    Join Date
    Dec 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm...making users login does indeed not sound very user friendly. I tried it with that site I mentioned above and cleared and then disabled my cookies. It seems not to count. So I guess they do something with my IP address (maybe log it into a database or something?.

  6. #6
    SitePoint Member
    Join Date
    Dec 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know why, but their security seems to be awesome. Does anyone know how they do it?

  7. #7
    hi galen's Avatar
    Join Date
    Jan 2006
    Location
    New Haven, CT
    Posts
    1,228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you really interested in making one of these or jsut looking for ways to cheat them

  8. #8
    SitePoint Wizard wonshikee's Avatar
    Join Date
    Jan 2007
    Posts
    1,223
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Three tools to use is IP, user agent, and cookie.

    Although i've never done something that requires this, I would wager there's a good balance of those 3 to determine uniqueness, which of course is impossible to be absolute in a stateless environment. Some ARE going to slip through but you also don't want to limit too many users.

  9. #9
    SitePoint Member
    Join Date
    Dec 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by galen View Post
    Are you really interested in making one of these or jsut looking for ways to cheat them
    hahaha, wanna make sure people will not cheat me when I build something myself


Bookmarks

Posting Permissions

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