What is a reliable method to record votes from anonymous users, without allowing duplicates

前端 未结 8 1972
广开言路
广开言路 2021-01-30 11:16

First of all, I searched as best I could and read all SO questions that seem relevant, but nothing specifically answered this. This is not a duplicate, afaik.

Obviously

8条回答
  •  无人及你
    2021-01-30 11:31

    I have the same problem, and here's what I am planning on doing...

    Set a persistent cookie. Check the cookie to decide whether a particular vote could be cast. Additionally store some data about the vote request in the form of a combination of IP address + User Agent. And then use this value to limit the no. of votes to, say, 10 per day.

    What is the best way of going about creating this hash (IP + UA String)?

提交回复
热议问题