Basically, I have a blog where I want to add a rating system, which will allow users to rate each post on a scale from 1 to 5. I do not want the users to sign in, as that is too much hassle from my part. However, I also want to save some of the ratings.
For instance, lets say X is a user who rated an article 3/5. When X visits this article again, I want to be able to identify X and tell him/her that he/she has already rated this article 3/5. So of course, some data needs to be saved in my database. Whats the best way to do this? I can collect X's cookie or IP and keep it in my DB, and each time this cookie/IP rates an article, I simply save it under the cookie/IP.
For my case, what will be better to use : cookies or IP? And if possible, can anyone explain the differences between the 2? Are cookies simply unique strings that identify a device uniquely? Do cookies change for a device and if so, at what frequency? Thanks.