I've recently implemented a working custom liking/disliking function for my comics site.
but I feel it’s pushing me towards implementing a login system for all users… which I really don’t want to have to do (for my sake and my fans' sake)
Currently, the function works by:
1) Passing button value (id = 'like' or id = 'dislike') via Jquery to php script
2) script will first check if an ip exists in the database against that given comic id... if not it will insert user's IP and current comic ID and increment total likes for a given comic id... if it already exists, it will remove that user’s information and decrement total likes.
The issue is, what happens if multiple fans “like” or “dislike” a comic from the same IP (net café, etc), or the same user goes and likes a comic from another computer… So I was thinking the way to solve that would be generate a unique value for the user’s session and store it against their IP.
But what if that user wanted to come back at a later point after their unique session ID has expired and change their like to a dislike… how would the computer know it’s them? Or what happens if the same user expires their session ID somehow (logs off then logs back in, closes browser, etc) and now can vote multiple times?
So, I have a couple questions:
In this case, do I have to create a login system?
How would making a user have to log in to like my images affect their willingness to do so?