Prevent additonal "Likes" on a post with AJAX/jQuery/PHP
I have a site, built using CakePHP.
This site relies on submissions by users who do not authenticate to post.
I'd like to have a "Like" system in place for each post (not Facebook "Like", a cu开发者_高级运维stom "Like" system).
I know this has come up before but what is the most rock solid way of preventing someone sitting there clicking "Like" hundreds of times. I'm happy to use any method possible, IP locking, localStorage, etc...
Thanks
You could use PHP sessions to store when a user already voted. Of course, as you told, you can use IP locking with some database management.
Wikipedia uses IP locking. That seems to be the only real way to lock-down anonymous users, although you'll lose any users who are forced into a shared IP behind a NAT.
精彩评论