Jump to content

is there a way to tell the user left?


onedumbcoder

Recommended Posts

A table "onlineusers".

 

Someone logs in an entry is created with their user ID and time.

 

Every time they visit a page that time is reset in the table. If no activity for, let's say 20 minutes, another script running (cron job is best) every minute or so clearing out those with expired times.

 

If the user is active again their entry is re-created in the table with a new time.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.