You are here: Re: Checking to see if a user is logged in « All PHP « IT news, forums, messages
Re: Checking to see if a user is logged in

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация