[SOLVED] the problem of dynamic ip address

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
pauliusas
Forum Newbie
Posts: 3
Joined: Thu Nov 11, 2004 5:00 pm

the problem of dynamic ip address

Post by pauliusas »

Hello,
i want to create a page where everyone could vote for his favorite music group. That is, everyone could vote for his favorite group. As a result the group which will get most votes become a winner.
So, i would like to ask: "How could i make the page that nobody could vote two, three, four .... times".
Tirst of all i read everyone's ip and put in database. And the computer which ip is in database could not vote second time.
Everything is fine, but what shall i do if the person who votes has a dynamic ip address. He could vote several times? What is the solution?
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

There is not really a full solution to solve this problem as you can always get around things that you put in place, but as you should find that as long as you make it harder to cheat then less people will as it just takes too long to do and its not worth it. A few methods that you can use are:

- Set a cookie/session to say that the user has voted.
- Record usernames if the user is logged in.
pauliusas
Forum Newbie
Posts: 3
Joined: Thu Nov 11, 2004 5:00 pm

Post by pauliusas »

So there are no solutions.
Because everybody could delete a cookie and everybody could create two, three, four... usernames.
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

one idea that sort of helps that makes life more annoying for people is to get them to enter a email address that you store and send a confirmation email to for either sign up or in your case possibly with every vote, then only let that email address vote once.

If people are using multiple email address to create multiple users then it will be annoying to have to check every email address and click on a link to confirm registration or the vote.

It is not fool proof but will be enough of a deterent that you won't get lots of people voting more then once, maybe twice.
pauliusas
Forum Newbie
Posts: 3
Joined: Thu Nov 11, 2004 5:00 pm

Post by pauliusas »

Kettle-drum, PhpScott thank you!
Post Reply