For my new project I need a voting script, which makes registered an unregistered users of my website able to vote for content on that website. Users (registered and unregistered users) should only be able to vote one time for the same content. The registration of the votes from the registered users isn't a problem, I think. I just put the user id and the content id in a table in my database, which I can check before I save the new votings in my database. But I'm not sure how to handle unregistered users. Is there a best practice to restrict the amount of votings a unregistered user can give for the same content?
I'm using PHP and mysql at the moment.