fikiwan Posted June 30, 2013 Share Posted June 30, 2013 hey everyone I want count how long some one when they do login at my web ..... how for do that ...... thanxks regard Link to comment Share on other sites More sharing options...
justsomeguy Posted July 1, 2013 Share Posted July 1, 2013 There's not a reliable way to do that. The basic idea would be to update your database every time they send a request to your site for any page. One way would be to periodically send ajax requests to update the timer in the database, so you maybe send an ajax request every minute or so to add another minute to the database. But obviously you can't tell if they have your site open in a browser but aren't actually using it, maybe they walked away for an hour. Sending ajax requests frequently will also cause their PHP session to never expire if you're using the session. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now