记录在我网站上的时间 [英] logging time spent on my website

查看:67
本文介绍了记录在我网站上的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

即将建立一个脚本,记录访问者在我网站上花费的时间。

我对此有一些想法,也许检查访客ip随着时间的推移在db中存储

信息,然后使用会话变量来检查超时...


任何人都有任何关于这样做的想法脚本?


谢谢!

-


Hi guys,
Im about to build a script which will log visitor time spent on my website.
I got a few ideas about this, maybe checking visitors ip and storing that
info in db with time in and then using session vars to check time out ...

Anyone has any ideas about doing that kind of script?

Thank you!
--
Yang

推荐答案

IP跟踪不是一个好方法,特别是对于AOL用户来说。


一般理论是你更新时间戳,当时间戳是比预定的时间更早了,然后假设它们已经离开了。


当你更新时间戳时,你也可以计算出来之间的差异/>
时间戳,以了解他们在那里呆了多长时间。


再次,假设他们离开,如果差异变得太大


-

Mike Bradley
http://www.gzentools.com - 免费在线php工具

" Yang Li Ke" <亚****** @ sympatico.ca>在留言中写道

新闻:哦******************* @ news20.bellglobal.com ..。
IP tracking is not a good way, especialy when it comes to AOL users.

general theory is you update a time stamp, and when the time stamp is older
than a predeterimed time, then it is assumed they have left.

when you update time stamp, you could also, calc the differnce between
timestamps, to get an idea of how long they were there.

again, assume they left if diff becomes too great

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Yang Li Ke" <ya******@sympatico.ca> wrote in message
news:Oh*******************@news20.bellglobal.com.. .
大家好,
即将建立一个脚本,记录访客花在我的
网站上的时间。我对此有了一些想法,可能会检查访问者ip并将数据存储在数据库中,然后使用会话变量检查超时...

任何人都有任何想法做那种剧本?

谢谢!
-

Hi guys,
Im about to build a script which will log visitor time spent on my website. I got a few ideas about this, maybe checking visitors ip and storing that
info in db with time in and then using session vars to check time out ...

Anyone has any ideas about doing that kind of script?

Thank you!
--
Yang



确定但是要更新mysql数据库中的时间戳吗?

我需要在页面上打开一个无尽的while()或

你有其他的想法吗? />

Thanx Count,我知道我可以指望你;)

-

Yang

" ; CountScubula" < me@scantek.hotmail.com>在消息中写道

news:cG ****************** @ newssvr29.news.prodigy.c om ...
ok but to update that timestamp in a mysql db right?
I need to open up a endless while() on the page or
you have other ideas?

Thanx Count, I know I could count on you ;)
--
Yang
"CountScubula" <me@scantek.hotmail.com> wrote in message
news:cG******************@newssvr29.news.prodigy.c om...
IP跟踪不是一种好方法,特别是涉及AOL用户时。

一般理论是你更新时间戳,当时间戳比预定时间早了
,然后假设他们已经离开。

当你更新时间戳时,你也可以计算
时间戳之间的差异,以了解他们在那里有多长时间。再次,假设他们离开了,如果差异变得太大了

-
迈克布拉德利
http://www.gzentools.com - 免费在线php工具
Yang Li Ke <亚****** @ sympatico.ca>在消息中写道
新闻:哦******************* @ news20.bellglobal.com ..
IP tracking is not a good way, especialy when it comes to AOL users.

general theory is you update a time stamp, and when the time stamp is older than a predeterimed time, then it is assumed they have left.

when you update time stamp, you could also, calc the differnce between
timestamps, to get an idea of how long they were there.

again, assume they left if diff becomes too great

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Yang Li Ke" <ya******@sympatico.ca> wrote in message
news:Oh*******************@news20.bellglobal.com.. .
嗨伙计们,<我即将建立一个脚本,记录访问者在我的
Hi guys,
Im about to build a script which will log visitor time spent on my


网站上花费的时间。


website.

我对此有一些想法,可能会检查访客ip并存储
db中有关时间的信息然后使用会话变量检查超时
....
任何人都有关于做那种脚本的想法吗?

谢谢!
-

I got a few ideas about this, maybe checking visitors ip and storing that info in db with time in and then using session vars to check time out ....
Anyone has any ideas about doing that kind of script?

Thank you!
--
Yang




包括一个脚本开始你的所有页面,或者在你的主页中包括

脚本做另一个包括。


然后在这个脚本中你这样做:


通过session或db或flat文件更新,由你决定,

从文件/ db / session获取时间戳从上次减去差异到

这次是一家商店,作为现场时间。

然后存储当前时间邮票


你现在有2件物品,最后时间长度和当前时间戳。


就是这样,不要做无穷无尽的时间循环!


然后在另一个页面或统计数据跟踪你要进行的事情,循环

通过数据,并查看所有

时间长度。

-

Mike Bradley
http://www.gzentools.com - 免费在线php工具

" Yang Li Ke" <亚****** @ sympatico.ca>在消息中写道

news:7q ******************* @ news20.bellglobal.com ..。
include a script at the begining of all your pages, or in your main include
script do another include.

then in this script you do this:

update via session or db or flat file, its up to you,
get the timestamp from file/db/session subtract the diff from last time to
this time, an store that as the time on site.
then store current time stamp

you now have 2 items, last length of time, and current time stamp.

thats it, do not do an endless while loop!

then on someother page or stats tracking thing you have going on, loop
through the data, and look at all
the lengths of time.
--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Yang Li Ke" <ya******@sympatico.ca> wrote in message
news:7q*******************@news20.bellglobal.com.. .
好吧,但是要在mysql数据库中更新那个时间戳吗?
我需要在页面上打开一个无尽的while()或者你有其他想法吗?

Thanx Count,我知道我可以指望你;)
-


" CountScubula" < me@scantek.hotmail.com>在消息中写道
新闻:cG ****************** @ newssvr29.news.prodigy.c om ...
ok but to update that timestamp in a mysql db right?
I need to open up a endless while() on the page or
you have other ideas?

Thanx Count, I know I could count on you ;)
--
Yang
"CountScubula" <me@scantek.hotmail.com> wrote in message
news:cG******************@newssvr29.news.prodigy.c om...
IP追踪这不是一个好方法,特别是当涉及AOL用户时。

一般理论是你更新时间戳,当时间戳是
IP tracking is not a good way, especialy when it comes to AOL users.

general theory is you update a time stamp, and when the time stamp is


比预定的时间,然后假设他们已经离开。

当你更新时间戳时,你也可以计算
时间戳之间的差异,以了解他们在那里待了多久。

再次,假设他们离开了,如果差异变得太大了

-
迈克布拉德利
http://www.gzentools.com - 免费在线php工具
Yang Li Ke <亚****** @ sympatico.ca>在消息中写道
新闻:哦******************* @ news20.bellglobal.com ..
than a predeterimed time, then it is assumed they have left.

when you update time stamp, you could also, calc the differnce between
timestamps, to get an idea of how long they were there.

again, assume they left if diff becomes too great

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Yang Li Ke" <ya******@sympatico.ca> wrote in message
news:Oh*******************@news20.bellglobal.com.. .
嗨伙计们,<我将要建立一个脚本,记录访问者在我的
Hi guys,
Im about to build a script which will log visitor time spent on my


网站上花费的时间。


website.

我对此有一些想法,可能会检查访客ip并存储带有时间的数据库中的信息然后使用会话变量检查超时...
任何人都有关于做那种脚本的想法吗?

谢谢!
-

I got a few ideas about this, maybe checking visitors ip and storing that info in db with time in and then using session vars to check time out ...
Anyone has any ideas about doing that kind of script?

Thank you!
--
Yang





这篇关于记录在我网站上的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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