【发布时间】:2013-11-14 13:11:24
【问题描述】:
我想在我的 php 网站上显示访问者总数,我发现一些 html / php 脚本显示这样的计数器
<!-- Start of SimpleHitCounter Code -->
<div align="center"><a href="http://www.simplehitcounter.com" target="_blank"><img src="http://simplehitcounter.com/hit.php?uid= " border="0" height="18" width="83" alt="web counter"></a><br><a href="http://www.simplehitcounter.com" target="_blank" style="text-decoration:none;">web counter</a></div>
<!-- End of SimpleHitCounter Code -->
我在 localhost 中尝试过,问题是如果我刷新同一页面,它会继续添加以计算我如何获得每个访问者的唯一计数,请帮助我,我在搜索时找不到任何合适的来源
【问题讨论】:
-
如果您不想重新发明轮子,请使用 Google Analytics。
-
检查您正在打开页面的 IP,并利用一次命中计数器的增量获取唯一 IP
-
这将在我的希望页面中显示访问者数量?