?
Solved

Login tracking...

Posted on 2001-08-14
6
Medium Priority
?
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 6385018
0
 
LVL 19

Accepted Solution

by:
cheekycj earned 136 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 132 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 132 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

Limited time offer using promo code EXPERTS30

Designed with a wealth of functionality and convenience, ATEN's new Thunderbolt™ 2 Sharing Switch takes your Thunderbolt setup to the next level. Now through September 15, 2017, Experts Exchange members get 30% off the US7220 on the ATEN USA eShop using promo code EXPERTS30.

Question has a verified solution.

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

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

752 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