Re: seeing who is using the site..



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.

Erwin Moller


--
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
.



Relevant Pages

  • Re: [PHP] url rewriting within sessions - confused newbie needs h elp
    ... The first time I load the page, I assume the session is created by ... and the cookie is sent to the browser. ... including a header to set the PHPSESSID cookie; ...
    (php.general)
  • Re: seeing who is using the site..
    ... course happily start a session anyway. ... That is why session timeout, eg after half an hour of no activity. ... untill *all* instances of that browser is closed. ... with the same session cookie. ...
    (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. ... 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. ... 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: Sessions and closing the browser
    ... >> share the same session name and, by association, the same session id. ... as I figured another window in the same browser ... Some users like to have multiple windows open at the same time, ... If the different browser windows share the same session cookie then they ...
    (comp.lang.php)