Online Offline

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
User avatar
Epiales
Posts: 1119
Joined: Thu Aug 15, 2013 1:38 am

Online Offline

Post by Epiales »

Me again lol...

Been thinking of having an icon in a users profile that would show it they are online or offline. If it's online, then the icon would show colored, if offline, then it would show black or something. I can probably figure out the icon in php but have no idea where to begin to setup the online/offline in php. Any ideas?
Nothing fancy, but a work in progress!

http://gameplaytoday.net
User avatar
MikuzA
Posts: 395
Joined: Thu Aug 08, 2013 8:57 am

Re: Online Offline

Post by MikuzA »

A simple solution would be that you store some kind of 'last_activity' timestamp, and if that timestamp is over 5-10 minutes old, that would mark the user offline. Otherwise Online.
Why so serious?

Business Intelligence, Data Engineering, Data Mining
PHP, HTML, JavaScript, Bash/KornShell, Python, C#, PL/SQL
MySQL, DB2, Oracle, Snowflake
Pentaho, DataStage, Matillion, Unity3D, Blender
Post Reply

Return to “Beginner Help and Support”