03-23-2009, 09:27 AM
[eluser]Iverson[/eluser]
I'm building a site that will have different categories. A visitor will to be able to comment on each category without any user authentication. Right now, for each comment I'm saving the ip, session id, timestamp, and user agent in the database. I've set CI's session expiration to 86400 (1 day). I then check a new comment to see if there is a comment less than a day old that has the same session id, ip, and user agent. If there is, you can't add a comment. This works but I'm need more brains to help me figure out if that's pretty much all I can do to ensure a visitor only comments on a category once a day. User authentication is out of the question. Thanks guys! (and girls)
I'm building a site that will have different categories. A visitor will to be able to comment on each category without any user authentication. Right now, for each comment I'm saving the ip, session id, timestamp, and user agent in the database. I've set CI's session expiration to 86400 (1 day). I then check a new comment to see if there is a comment less than a day old that has the same session id, ip, and user agent. If there is, you can't add a comment. This works but I'm need more brains to help me figure out if that's pretty much all I can do to ensure a visitor only comments on a category once a day. User authentication is out of the question. Thanks guys! (and girls)