|
-
Feb 26th, 2001, 07:00 PM
#1
Thread Starter
Fanatic Member
I know you can set the session variable time(default is 20 minutes) but I want to know how long my user is connect.
so if they come onto a page and leave after 5 minutes I want to write this to my database.
any suggestions?
thanks
-
Feb 27th, 2001, 07:50 AM
#2
Black Cat
Interesting, I was thinking about this the other day.
You would have to create session variables to store the start time and the end time. You'd set the start time on the session start event. Then everytime they access one of your pages you would set the end time. Then when the session ends or times out, you'd get the difference in the times and add that to the db. It wouldn't be 100% accurate but it would give you a good idea.
Also, I think you could mine the web servers logs for the same IP address and browser-specific HTTP headers to see the time period of someone's HTTP requests.
Josh
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Feb 27th, 2001, 01:31 PM
#3
Thread Starter
Fanatic Member
You can also use session_onstart and session_onend in the global.asa
then do some simple math on the two numbers, but I think I read somewhere that
the session_onend isn't always accurate.
right now I am writing to a database the users IP, connection speed, browser,and the time they hit the server.
what i want to do is find out how long they stay on the page. so a function has to run on session_end.
this is the only way I can think of right now.........
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|