Answer the question
In order to leave comments, you need to log in
Why are view rates different?
Hello! Visitors go to the site from facebook, where I publish links to news. When opening a page in php, I increase the counter of news views by one:
$db->query("UPDATE `news` SET `views` = `views` + 1 WHERE `id` = {$news_id} LIMIT 1");
Answer the question
In order to leave comments, you need to log in
Look at the logs, what to guess?
There are a lot of robots now, so it may well be
so many robots in a couple of hours
Each access to this page is 1 view. F5 spamming can get you lards of views. Your solution counts the number of page loads, a useless exercise, it makes no sense to build some kind of statistics on this data. To get started, track clicks on the link by adding some parameter to the address: site.ru/news/?ref=facebook.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question