Re: seeing who is using the site..




"Erwin Moller"
<Since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx> wrote in
message news:493facbe$0$183$e4fe514c@xxxxxxxxxxxxxxxxx
rf schreef:
"Erwin Moller"
<Since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx> wrote in
message news:493f9fe0$0$184$e4fe514c@xxxxxxxxxxxxxxxxx
Erwin Moller schreef:
The Natural Philosopher schreef:
Interesting problem. Who is 'online' to the site? and what pages are
they accessing..

Ok, could just do a nasty bit of regexp on the logs..but what about
every page extracting callers IP address, its own identity,(all my
pages are php) and possibly what bits of the database are being
accessed....

any ideas on a nice way to present this in a 'sysadmin' page?


Hi Philosopher,

The 'who-is-online' is a little hard on normal setups.
I approached it in the past like this, but that was on a site that
demanded people to log on first:
That was poorly and confusing formulated.
What I wanted to say: If you demand them to log in, you know WHO they
are, as opposed to unknown visitors that happen to start a session with
your site.
If they do not authenticate themself with username/password, you can of
course happily start a session anyway.

But you will never, ever, know when they "leave".

True.
That is why session timeout, eg after half an hour of no activity.
If you store the session in a db, they will get deleted after that timeout
has expired.


Hint: I sometimes have several copies of my several browsers open.
Sometimes for days. Perhaps weeks. A browser keeps a session cookie
untill *all* instances of that browser is closed. I may revisit the
subject site next week, with the same session cookie.

????
I don't see your the point of your hint, rf.

I use a timeout of half an hour on most of my sites (which is default I
think).
After that your browser holding a PHPSESSID (in cookie or url or form) is
invalid and the session file on the server will get deleted sooner or
later.
SO you can keep your browser open with its PHPSESSID cookie, but the
PHPSESSID is invalid when you return to the server.

Look at the subject line, "who is using the site".

You can tell when I start "using" it. You can never tell when I stop using
it'.

By your timeout you will determine that I have stopped "using" your site
sometime between one half an hour in the future and next week. Perhaps I
access one of your pages now, go get some coffee, get distracted and come
back tomorrow to actually read the page. When am I "using" your site? Now,
or tomorrow?



.



Relevant Pages

  • Re: infinite session timeout
    ... will remain in memory. ... closes their browser, then logs in again, you know will have two sessions on ... You should keep the timeout. ... It will be somewhat transparent for your users when their session does ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: seeing who is using the site..
    ... If you demand them to log in, you know WHO they are, as opposed to unknown visitors that happen to start a session with your site. ... If you store the session in a db, they will get deleted after that timeout has expired. ... A browser keeps a session cookie untill *all* instances of that browser is closed. ...
    (comp.lang.php)
  • Re: seeing who is using the site..
    ... If you demand them to log in, you know WHO they are, as opposed to unknown visitors that happen to start a session with your site. ... A browser keeps a session cookie untill *all* instances of that browser is closed. ... After that your browser holding a PHPSESSID is invalid and the session file on the server will get deleted sooner or later. ...
    (comp.lang.php)
  • Re: How to end a session when the user closes the browser?
    ... nothing happens on the server when the browser is closed. ... > session ends. ... I don't want to depend on the session timeout factor since ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: seeing who is using the site..
    ... If you demand them to log in, you know WHO they are, as opposed to unknown visitors that happen to start a session with your site. ... If you store the session in a db, they will get deleted after that timeout has expired. ... A browser keeps a session cookie untill *all* instances of that browser is closed. ...
    (comp.lang.php)