Unique IPs in a voting system

后端 未结 7 628
傲寒
傲寒 2020-11-29 10:37

I\'m creating a voting system for my PHP/MySQL website and I would like to make sure one user can only vote once. What would be a good way of doing this? So far I have thoug

相关标签:
7条回答
  • 2020-11-29 11:12

    You should store as much information as you can in a database if you want to have any chance of auditing your system. If you log a lot, then even if there has been voting fraud you might be able to detect it and cancel those votes.

    The second method is completely insecure. Users can just delete the cookie if they want to vote again and you will have no way to detect that this has happened.

    Important note

    There is not a one-to-one mapping between IP addresses an people. Some people have many IP addresses, whilst other people share a single IP address.

    0 讨论(0)
提交回复
热议问题