Re: Session still open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 11, 2008 at 9:01 AM, Bill <billlab51@xxxxxxxxxxx> wrote:
> Hi Daniel,
>
>
>  > on the site.  If all you want to do is find out if they still have the
>  > socket open, then there are much smaller, simpler ways.
>
>  Like what ?

    I meant as opposed to the session-handling method I sent in the
other thread.  However, you may want to look into having JavaScript
handle the session-watching, and report to the server via AJAX calls
every 30 seconds or so.  If JavaScript doesn't PING the server at
least once every thirty seconds, then you know either the user left
the page or closed the browser.  If it does, on the other hand, then
the PHP side of the AJAX routine simply updates the
[database/file/session info] to show that the user is still active.

-- 
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux