I'd like some advice with a story counter i've created which works on a users IP address and user agent
Basically the counter is added to if:
1) $_SERVER['HTTP_USER_AGENT'] is not empty. If it is then I don't add to the story count (as normal browsers idenitify themselves)
The problem being with this is that this is not fullproof. Is the best way of this maybe creating an array of banned user agents in an array and checking that array with the following in it:
Or is there a better way of doing this?
2) The IP address of the user (which is checked in another table) already exists then the counter is not added to
Big floor in this is that say a user visits a story on Monday then visits again on Tuesday the counter will not increment as the IP address exists. But then again I don't want the user sitting there hitting refresh 15 times to add to the count (Which is why I record the IP)
So are there any better ways of doing these two things?