C
CountScubula
Dr. Jason Gastrich said:Hi,
I need a way to time visitors that come and log in to my site. If the timer
could keep track of the amounts of time that logged in visitors spend, then
that would be great.
Any ideas? Any freeware out there that could do this?
Jason
Ok, here is one simple aproach.
Create an <IMG SRC= "script.php?user=some_id" NAME="imgTimer"> tag on the
page that points to a php script.
then, have a piece of java reload the image, every 10 to 15 minutes.
now that script that it is calling, tracks the referer page, current time,
and updates a count of how long you are on that page. if the time between
the last time you were on the page and the current time is too great say, 2
times what the update interval is, then you must be new or back to that
page. if you are to stay on the page/site, the script should notice this.
if they close the browser without logging off, doesnt matter.
I have done this quite successfully in the past, however, depends if they
have java script enabled.
Another way I do it these days, and is how some banks do it, is everytime
you click a page, they update a counder of the time you are online, and if
you are idle more than x amount of minutes, they assume you left, or closed
the browser, and they session is usualy expired.
One site I did for a client a while back, used this scheme, so users knew
how long someone was idle.