php-general Digest 4 Aug 2013 10:13:26 -0000 Issue 8321

Topics (messages 321782 through 321783):

how to see all sessions sets in server
        321782 by: Farzan Dalaee
        321783 by: Alessandro Pellizzari

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
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?

foreach($_SESSION as $k => $v)
{
echo $k."----------".$v;
}
 or how i handle online users?

--- End Message ---
--- Begin Message ---
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.



--- End Message ---

Reply via email to