Posted by Rich on 04/21/06 19:37
On 21 Apr 2006 06:54:35 -0700, tomhawkins1@gmail.com wrote...
>
>Hi,
>
>I need to be able to check remotely whether a user is logged in or not.
>
>My current log in script saves various bits of data to a session
>(including a user id). I need to find out via an admin script which
>users are currently logged in ie their $_SESSION['theuserid'] exists in
>any of the existing sessions.
>
>Thanks
>
>TomH
>
That might be a little tough to do because an HTTP connection isn't persistent.
On a temporary basis you could add a line of code to your PHP program to print
out the user's name and time to your web server's error_log. Maybe something
like...
<?php
error_log(time( ) . " " . $_ENV['REMOTE_USER']);
?>
Rich
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
Navigation:
[Reply to this message]
|