I want to know, is there a way to track how long anyone has been logged into website and then insert it up for each time they have logged on. In case, user a logs in for 30 minutes, then later comes back and logs in for an hour, then later comes back and logs in for 50 minutes, Add it up equal 2 hours 20 minutes. Is this possible? Thanks
The thing is that PHP only runs on page load meaning that you can't track how long the user is on the same page, unless he moves on to a new page. I would suggest taking a look at some JavaScript or Jquery - Link: adf.ly/ChX1z
I saw this on a site that has a timer to count how long a user is on a page, you could perhaps use that counter to store to a database or file when the user leaves and counter stops if its writing it to a file and stops overwriting when they're gone ?