Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP vote system, how to stop spamming?

Tags:

php

I want to set up a voting system which doesn't require people to log in, but they can vote as they want.

How do i stop people from spamming on voting (sending request to add the vote)? i know using client site scripting can easily stop it (from proper user), but what about server side (PHP). i don't want people to have that url and constantly hit it to increase the number.

Cheers

like image 412
Bill Avatar asked Feb 22 '23 13:02

Bill


2 Answers

Implement reCAPTCHA - it's super easy to implement (takes maybe 10 minutes), is a good anti-spam measure, and serves a greater purpose (digitising books).

If you really want to go with cookies, have a look into evercookies. They're super-invasive, and very unethical, but hey, it's your site :)

like image 76
Joe Avatar answered Feb 27 '23 10:02

Joe


You'll have to log their IP and/or set a cookie. The problem with cookies is the client can erase them and the problem with IP tracking is it can block more than one user if a NAT firewall is in the mix, but it will do well for the most part.

like image 23
davidethell Avatar answered Feb 27 '23 10:02

davidethell