ASP页面计数器 [英] ASP Page Counter

查看:68
本文介绍了ASP页面计数器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写了一个点击计数器,我相信我的页面是用户为用户每个唯一会话点击
的时间。


我的代码的相关部分如下:

If IsEmpty(Session(" TotalCount")))


''递增或重置计数

如果工作日(日期(),vbSunday)= 1并且dtDate<日期然后

iCount = 1

否则

iCount = iCount + 1

结束如果

dtDate =日期


结束如果


会话(" TotalCount")= iCount


该页面是 www.middlesexccl.com

我的问题是我无法相信我得到的点击次数 - 或更多

我应该信任我得到的点击次数。


当我第一次访问URL时,我看到计数增加了一个,但是如果我重新加载则不会是
令人难以置信页面。


是否有任何相关俱乐部可以使用的技术,即一些从他们的网站链接到页面的花式某种可能是

导致计数过度增加?我很抱歉,如果这听起来有点模糊,但是我不能知道这些热门来自哪里。


如果有人对如何测试任何其他的odeas请告诉我

详情。


非常感谢所有给予他们关注的人。


Paul Smith

I have written a hit counter, which I believe counts the times my page is
hit by a user for each unique session by the user.

The relevant part of my code is below:
If IsEmpty(Session("TotalCount")) Then

'' Increment or reset the count
If Weekday(Date(),vbSunday) = 1 And dtDate <Date then
iCount = 1
Else
iCount = iCount + 1
End If
dtDate = Date

End If

Session("TotalCount")= iCount

The page is www.middlesexccl.com
My issue is I cannot believe the number of hits I am getting - or more
accurately should I trust the number of hits I am getting.

When I first go to the URL I see the count increased by one, but it does not
incredment if I reload the page.

Is there any techniques that the clubs involved could be using, i.e. some
sort of ''fancy'' linking to the page from their web site which might be
causing the count to be incremented unduely? I am sorry if that sounds a
little vague but I cannot udnerstand where the hits are coming from.

If anyone has any other odeas on how to test this please let me have
details.

Many thanks to all those who give this isue their attention.

Paul Smith

推荐答案

" Paul W Smith" < pw*@NOSPAM.twelve.me.ukwrote in message

news:Oq ************** @ TK2MSFTNGP05.phx.gbl ...


[snip]
"Paul W Smith" <pw*@NOSPAM.twelve.me.ukwrote in message
news:Oq**************@TK2MSFTNGP05.phx.gbl...

[snip]

我的问题是我无法相信我得到的点击次数 - 或更多

我应该相信我得到的点击次数。
My issue is I cannot believe the number of hits I am getting - or more
accurately should I trust the number of hits I am getting.



检查原始Web日志文件。


他们会识别每个日期,时间和IP地址点击。


FTP进入您的网站;如果你找不到它们,那就问你的网站主持人。

Check your raw Web log files.

They''ll identify the date, time, and ip address of each "hit".

FTP into your site; if you can''t find them then ask your Web host.



> ;我的问题是我无法相信我得到的点击次数 - 或者更准确,我应该相信我得到的点击次数。
>My issue is I cannot believe the number of hits I am getting - or more
accurately should I trust the number of hits I am getting.



检查您的原始Web日志文件。


他们会识别每个日期,时间和IP地址点击。


FTP进入您的网站;如果你找不到它们,那就问你的网站主持人。


Check your raw Web log files.

They''ll identify the date, time, and ip address of each "hit".

FTP into your site; if you can''t find them then ask your Web host.



感谢您的好建议 - 在网上找到网页的一些解释,

以及本周日志文件的一些整合之后,我可以看到我的

命中数实际上非常准确!

Thank for that great advice - found some explainations of web pages on web,
and after some integration of the log files for the week, I can see that my
hit count is actually pretty accurate!


Paul W Smith于2008年8月15日写的

microsoft.public.inetserver.asp.general:
Paul W Smith wrote on 15 aug 2008 in
microsoft.public.inetserver.asp.general:

If IsEmpty(Session(" TotalCount")))


''递增或重置计数

如果工作日(日期(),vbSunday)= 1并且dtDate<日期然后

iCount = 1

Else

iCount = iCount + 1

结束如果

dtDate =日期


结束如果


会话(" TotalCount")= iCount
If IsEmpty(Session("TotalCount")) Then

'' Increment or reset the count
If Weekday(Date(),vbSunday) = 1 And dtDate <Date then
iCount = 1
Else
iCount = iCount + 1
End If
dtDate = Date

End If

Session("TotalCount")= iCount



这只会在每次会话时增加一次iCount。


在我看来,上述情况不是全部。


请显示最小值l工作实例。


-

Evertjan。

荷兰。

(请更改我的电子邮件地址中的点数x''点数)

This will only increment iCount once every session.

Seems to me the above is not the whole story.

Please show a minimal working example.

--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)


这篇关于ASP页面计数器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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