How can I check if the user is away ,offline, and online.. BTW my chat room alway refresh every 5 sec..
Should I use timestamp.
if I use timestamp I think it will updated every time my page refresh. is it??
is there any alternative for it? or timestamp would be better
1 Replies - 3662 Views - Last Post: 26 March 2013 - 08:44 PM
Replies To: How to check online/offline/away status or ajax with jquery and php
Re: How to check online/offline/away status or ajax with jquery and php
Posted 26 March 2013 - 08:44 PM
it really depends on how your client/server are implemented, if you have to make a call to the database to retrieve some value for the users anyways, another simple database field with a status integer should do the trick just fine, but a little more specifically, 0=online, 1=away, otherwise yes, a timestamp of the last action so you can calculate a timeout for the user being 'offline'
Page 1 of 1