Re: Active PHP Sessions

From: Date: Fri, 07 May 2004 13:47:11 +0000
Subject: Re: Active PHP Sessions
Groups: php.general 
Request: Send a blank email to php-general+get-185618@lists.php.net to get a copy of this message
An active session would be one that has not expired. Not necessarily that the user is not using the website. If the user leaves the site, the PHP session does not necessarily expire at that time. I want a list of PHP sessions that have not yet expired. Thanks! Paul
From: Jason Wong <php-general@gremlins.biz> To: php-general@lists.php.net Subject: Re: [PHP] Active PHP Sessions Date: Fri, 7 May 2004 20:50:18 +0800 On Friday 07 May 2004 20:32, Paul Higgins wrote: I'm on a shared server, and I do not believe that I have access to the /tmp directory where the session files are stored (I believe that is how it works :). Of course you have access to it. The webserver needs to be able to READ the session files that it writes and hence you're also able to access those files with PHP. I want to keep track of which sessions are active. Basically, I just want a list of the active sessions for my site. You would have to define what /you/ mean by an active session. How can I do this? i) There is no way to determine which session files are for your site without actually examining their contents. ii) PHP does not store any site identification info in the session files. iii) Hence you need to store a (hopefully) unique string in all your sessions then search for this string in the session files. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Phasers locked on target, Captain. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.com/go/onm00200415ave/direct/01/

« previous php.general (#185618) next »