Its difficult, because you really don't know when the user quits the
session, unless they actually log out. Or work with some fancy _javascript_
that knows when the user closes the browser or navigates away form your
site.
I guess the simplest way would be to set a session var when they logged in,
use dateDiff when the user logs out and insert in a database.
If you need to get this info from a log file then I guess you'd have to
start with the first entry, check if the second entry is within X timeframe
(i.e. still counting as one session) and so on, then take the difference
between the first entry and the last entry.
But like I said it all depends on whether you only want to count the time
they are really logged in, and whether they really log of or not.
Taco Fleur
Blog <http://www.tacofleur.com/index/blog/>
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/
0421 851 786
Tell me and I will forget
Show me and I will remember
Teach me and I will learn
-----Original Message-----
From: Emmet McGovern [mailto:[EMAIL PROTECTED]
Sent: Monday, 26 January 2004 5:33 PM
To: CF-Talk
Subject: log visit time?
Anyone know of a simple way to keep track of the total amount of time a
user is logged into an application for? I need to be able to keep track
of total amount of time an application is in use and break it down by
user.
Thanks,
Emmet
_____
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- log visit time? Emmet McGovern
- Re: log visit time? Taco Fleur
- Re: log visit time? Christian Cantrell
- RE: log visit time? Emmet McGovern