Identifying comments from the same source
What ideas can开发者_运维问答 I try to find out if comments are from the same users. The assumption is that people will try to cheat and post comments under multiple pseudonyms. My environment is PHP and I can install any third party library as needed. What should I do to minimize this risk and identify comments posted by the same source (as much as possible).
You can identify the user by logging the IP address upon the users first comment, then checking to see if that IP address exists in the database on any subsequent comments. However, this data can be spoofed so it isn't fail-safe.
The only way you can realistically do this is to enforce a user login for comments, as IP addresses aren't sufficiently unique and cookies are trivial to erase at the client end.
That said, there is of course nothing to stop people creating multiple users accounts with a variety of email addresses (gmail/Yahoo, etc.) so you'll want to create your own tools/admin view so you can trivially check IP addresses if you suspect people are still misbehaving. (A tool for your armoury if nothing else.) On a similar basis, you could also log the browser agent header.
精彩评论