开发者

Logic for number of person viewed

I want to show the number of viewer for a particular Article. Ho开发者_运维百科w i will do it in my program? Any strategy, someone can suggest ...


If you aren't using any framework or CMS, then you can integrate either Google Analytics or Piwik into your website. Then use their inner data to display number of views/unique views per article.


  1. Make a table with article id/url (or whatever you technique is), IP, user agent.
  2. In every relevant page have each page access write down these values.
  3. To display number of views simply select count
  4. To display number of unique views display count(distinct)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜