使用PHP跟踪页面浏览量 [英] Track Page Views using PHP

查看:96
本文介绍了使用PHP跟踪页面浏览量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种跟踪页面访问量的方法,而无需计算重复次数(例如有人多次点击刷新),并且我想找出最好的方法来跟踪每个页面单个IP地址即可查看该页面.也许是饼干?还有其他建议吗?

解决方案

要么使用 Webalizer 来分析您的日志文件或使用 Google Analytics(分析)为您跟踪这些指标,或者-如果您正在寻找有关可扩展的自托管解决方案,请尝试 Piwik :

Piwik是可下载的,开放源代码(已获得GPL许可)的实时Web分析软件程序.它为您提供有关网站访问者的详细报告:他们使用的搜索引擎和关键字,他们说的语言,您的热门网页等等.

无论如何,没有理由在这里重新发明轮子.另外,上述软件只是其中的网络分析工具的一小部分. >

I'm looking for a way to track the number of visits to a page, without counting duplicates (like someone hitting refresh several times) and I'd like to figure out the best way to do it without keeping track of every single IP address to view the page. Perhaps a cookie? Any other suggestions?

解决方案

Either use Webalizer to analyse your logfiles or use Google Analytics to track those metrics for you or - if you are looking for an extendable and self hosted solution, try Piwik:

Piwik is a downloadable, open source (GPL licensed) real time web analytics software program. It provides you with detailed reports on your website visitors: the search engines and keywords they used, the language they speak, your popular pages… and so much more.

In any case, there is no reason to reinvent the wheel here. Also, the software mentioned above is only a tiny fraction of web analysis tools out there.

这篇关于使用PHP跟踪页面浏览量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆