Public Voting and Avoiding Unanimous Voting: Using Cookies or IP?

How do you handle public voting (anyone can “love or dislike” an article) and restrict it to voting only once?

Can cookies be used? (with the problem that he can delete the cookie and vote x999 times), or am I storing his IP address in the database?

thank

+3
source share
5 answers

The solution consists of three parts:

  • use cookie to prevent double voices.
  • store all voting events in the database (ip, user agent, poll / article id, vote)
  • , 24 , , # 1. # 2

IP- , .

+1

IP.

IP, ( cookie).

+1

, , , IP, IP cookie .

0

, .. , , , . cookie, ..

0

Instead of cookies, you can use evercookie , which is much more difficult (but still possible) to bypass.

evercookie is an accessible JavaScript API that produces extremely persistent cookies in the browser. this goal is to identify the customer even after they have deleted the standard cookies, Flash cookies (Local Shared Objects or LSOs) and others.

0
source

All Articles