0

Hi

Is it posible to display a list of members that are currently logged in on my website in PHP. Or should I use AJAX ?

Any ideas, and if possible how would I go about doing this.

Happy easter everyone :)

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Designer_101
0

Well I think what phpbb does is it writes to a text file each username as they log in and removes their username from that text file when they log out. Then to display the list of usernames, phpbb then simply just retrieves the contents of that text file with the explode function. But in my preference, I would say welcome to the twenty first century. I would use mysql databases to record how long ago each user last visited a webpage and if a user last visited a page longer than an hour ago, they are then removed off the list or if they visit a new webpage, the new webpage url overwrites the entry for the existing url on the list for that user.

0

But when you say when a user logs out. What if they don't click the logout button. I know many people that simply close their browser and dont understand the problems they cause.
Surely there is a more complex and reliable method?
I beleive daniweb use what i'm trying to make at the top of the page once logged in. Do you think its PHP? Or perhaps AJAX ?

Thanks for the reply

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.