Re: how to see all sessions sets in server

[email protected] (Alessandro Pellizzari)
Newsgroups php.general
Message-ID <[email protected]>
Il Sun, 04 Aug 2013 13:32:55 +0430, Farzan Dalaee ha scritto:

> hi i want to write online user module for my site and i want to check
> $_SESSION['userID'] to find all users id who loged in but when i echo
> this code its return only current user detail how i can see all
> sessions?

You can't.

>  or how i handle online users?

Every user has its session.

If you want to have a "super user" who has access to all the sessions, 
you can use the filesystem functions to read the directory in which the 
sessions get saved (it depends on the server configuration) or you can 
implement a session handler to save all the sessions in the database, and 
give access to that table to one user.

Bye.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.