且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JavaScript中的网站访问计数器

更新时间:2023-12-02 14:38:46

在文章< d5 ********** @ sunce.iskon.hr>中, op *** **** @ mail.inet.hr 开明

我们...
In article <d5**********@sunce.iskon.hr>, op*******@mail.inet.hr enlightened
us with...
你好,

任何人都可以寄给我一个链接,甚至是一些计算网站访问量的脚本样本?
Hello,

can anyone send me a link or even some sample of script that counts visits
to a website ?




这种情况​​通常不适用于各种客户端脚本 b $ b原因。

你为什么要这样?

Google页面计数器可以找到大量的东西,免费和其他。


-

-

~kaeli~

克苏鲁拯救我们的灵魂并赎回他们宝贵的

优惠券以后。
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace



This is not commonly implemented with client-side script for a variety of
reasons.
Why do you want that?

Google page counters to find tons of the things, free and otherwise.

--
--
~kaeli~
Cthulhu saves our souls and redeems them for valuable
coupons later.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace


TomCat写道:
TomCat wrote:
任何人都可以给我发送一个链接,甚至是一些对网站进行访问的脚本样本吗?
can anyone send me a link or even some sample of script that counts
visits to a website ?




No.可见的网站柜台服务没有目的,甚至没有计算访客的预期目的。它可以计算下载,而不是访问者,如果

(考虑代理和客户端缓存)。获取正确的访问日志

评估工具,已安装服务器端,并且肯定没有实现

服务器端JS。

PointedEars



No. A visible website counter serves no purpose, not even the intended
purpose of counting visitors. It can count downloads, not visitors, if
that (consider proxies and client-side caches). Get a proper access log
evaluation tool, installed server-side, and most certainly not implemented
with server-side JS.
PointedEars


" Thomas''PointedEars''Lahn &LT;宝********* @ web.de&GT;在消息中写道

news:19 **************** @ PointedEars.de ...
"Thomas ''PointedEars'' Lahn" <Po*********@web.de> wrote in message
news:19****************@PointedEars.de...
TomCat写道:
TomCat wrote:
任何人都可以给我发一个链接,甚至是一些计算访问网站的脚本样本吗?
can anyone send me a link or even some sample of script that counts
visits to a website ?



没有。一个可见的网站柜台没有任何意义,甚至没有计算访客的预期目的。它可以计算下载,而不是访问者,如果是(考虑代理和客户端缓存)。获得一个适当的访问日志
评估工具,安装服务器端,并且肯定没有实现与服务器端JS。



No. A visible website counter serves no purpose, not even the intended
purpose of counting visitors. It can count downloads, not visitors, if
that (consider proxies and client-side caches). Get a proper access log
evaluation tool, installed server-side, and most certainly not implemented
with server-side JS.




实际上,一个可见的网站计数器可以根据IP

地址统计唯一身份访问者。这不是很完美,但也没有很多访问日志,原因相同




我有一些个人网站托管在我的ISP上,它不支持任何服务器端处理

。当我想要一个点击计数器时,我使用免费的

点击计数器服务,如 www.amazingcounters.com (或google免费打击

计数器) - 他们是服务器端 - 服务的服务器:你将它们添加到

只需插入一个< img>标签。


免费计数器的下行 - 他们是广告客户驱动的,所以你必须在你的柜台上有广告链接

。对我正在计算的东西没什么大不了的 -

由OP决定是否可以接受。



Actually, a visible website counter CAN count unique visitors, based on IP
address. It''s not perfect, but neither are many access logs, for the same
reasons.

I have some personal sites that are hosted on my ISP, which doesn''t support
any server-side processing. When I want a hit counter, I use a free
hit-counter service like www.amazingcounters.com (or google "free hit
counter") - they''re server-side - the service''s server: you add them to
your page by simply inserting an <img> tag.

Downside to free counters - they''re advertiser-driven, so you have to have
the ad link on your counter. No big deal for the stuff that I was counting -
It''s up to the OP to decide if that''s acceptable.