Solved

Login tracking...

Posted on 2001-08-14
6
191 Views
Last Modified: 2013-12-24
I have an application that tracks users, and only allows one user to use their logon at that time...

The question that I have is how do I track a users time spent logged in? I have the start time inserted into a table called http_refer and want to be able to pull information that pertains to the record where the Start time was inserted...

So the user that logged in at 10am (referer_ID=218) will be logged out at 10:30am with that same referer_ID...

The table info is connected to the http_referer table using the info.company_ID (Pk) and the http_referer.company_ID (Fk).

If anyone can understand what I am talking about AND can help me, that would be great...

Gordon
0
Comment
Question by:webmaster256
6 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 6385018
0
 
LVL 19

Accepted Solution

by:
cheekycj earned 34 total points
ID: 6385037
Ignore my last comment...

Here is a decent way to track a user's time.

When the user logs in update a FirstLoggedIn timestamp.

Now everytime this user requests a new page update another field LastLoggedIn timestamp.  Now with every request this field will be updated but you should get a pretty acurate read on the time spent.

It is a hit on the DB though.. with all the updates.

CJ
0
 
LVL 1

Assisted Solution

by:snakehollywood
snakehollywood earned 33 total points
ID: 6402138
But then if you use client variables stored in a database, this is also a hit on every page. So you can kill 2 birds with one stone and read info from the clientstorage database to setermine how many people are logged in.
0
 

Assisted Solution

by:brettstil
brettstil earned 33 total points
ID: 6432849
You also need to be aware of the session timeout settings.  The CF default, I believe, is 20 minutes.  If a user clicks a logout button, then you know exactly when they logged out.  But if their session times out instead, you could either use the last page view time or the last page view time plus the session timeout as the "logout" time.
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10837368
No comment has been added lately, so it's time to clean up this question.
I will leave the following recommendation in the Cleanup topic area:

Split cheekycj & snakehollywood & brettstil

Please leave any comments here within the next four days.

mrichmon
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

937 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now