multi-session access...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
runelore
Forum Commoner
Posts: 25
Joined: Thu Aug 22, 2002 10:14 am

multi-session access...

Post by runelore »

Hi, I am writing a chatroom script and I have a systems using sessions. what I want is for a part of the script to be able to check for all sessions that are currently present and then to display the session names. (i have set it up so that when different people log in to the chat room is assigned a specific name to the session. I need to be able to access them all.....

please help....
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

Well, if you use default PHP sessions, they are stored in text files in a directory that you specify in the php.ini file. If you really want to parse all those, you can do it.
A better solution is to keep all the people who are logged in stored in a database field, or, if that's not available, a text file. This will be *much* faster than parsing the session files.
Post Reply