sql - Best way to store "views" of an topic -


I use this code to update the visibility of a topic.

  Update topics SET views = idea + 1 WHERE id = $ id  

The problem is that users get F5 to get ridiculous views Like spam.

How should I get unique hits? Create a new table where I store the IP? Do not want to store it in cookies. It is very easy to clean your cookies.

I will prepare a separate table to store this information. Then you can get a large amount of data and there is no need to update the table, which is most likely to be read.

You will always use INSERT in TLLTIC visuals ...

And you get some information on the hit IP address, date and time, perhaps browser version, operating system etc. You can get the information, get as much information as you can - whatever you can get your hands, in this way, you can filter the refresh request from time to time.

It is worth considering that many users can share an IP - for example, a complete office can go through the same router


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -