Posted 15 November 2012 - 09:53 AM
Since PHP is stateless* you'd end up having to add two fields to Members or a new table designed with MemberID, LastRequest, TotalTime. Every time a logged in user requests a page it would have to check if the last activity date longer than the timeout duration (predetermined, 10 minutes or whatever you would want to set it to); if it was too long it simply appends the new date to LastRequest, otherwise it gets the time difference in minutes and adds it to TotalTime.
But then you're going to run into an issue where TotalTime is going to exceed the max int value
*someone please correct me if I'm wrong here