Page 1 of 1
Stats of viewers
Posted: Thu Dec 24, 2009 7:10 pm
by xionhack
Hello. I have a website in php and people can login. I want to make an admin control panel where u can see how many people are currently logged in and also how many people in total (including the ones that are not logged in) are visiting the site in this moment. How can I do that? Thanks!
Re: Stats of viewers
Posted: Fri Dec 25, 2009 1:50 am
by tang
make a colum in user table of database.if the user is online.then the colum value is 0,if the user logout, turn it to 1.
if you want to kown how many pepole is visting. It's the same way!
Re: Stats of viewers
Posted: Fri Dec 25, 2009 11:44 am
by xionhack
How about if the person just closed the browser without login out, how would I know? Thanks!
Re: Stats of viewers
Posted: Sat Dec 26, 2009 5:09 am
by jhack
@xionhack
I think then you should consider about session time up after particular time form his last action. The time depends on your need.