Re: seeing who is using the site..
- From: Erwin Moller <Since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx>
- Date: Wed, 10 Dec 2008 11:06:12 +0100
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:
1) Use session
2) Use DB storage of the sessions
Now you can easily check who is only, simply by looking in the session table.
If you don't use sessions, it is very hard to track such things.
You have no way of knowing if people simply close the browser, or go somewhere else.
Of course you can use the IP to do a little monitoring, but that fails when people use the same IP (as many do).
So cookies make more sense to track that, but then again, they can be disabled.
I think a session is the best way to monitor such things. They use URL rewriting or change the forms you use if cookies are disbaled.
Then, on every request to your website, use the session to update what you want in your monitoring logic.
Regards,
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
.
- Follow-Ups:
- Re: seeing who is using the site..
- From: The Natural Philosopher
- Re: seeing who is using the site..
- From: Erwin Moller
- Re: seeing who is using the site..
- References:
- seeing who is using the site..
- From: The Natural Philosopher
- seeing who is using the site..
- Prev by Date: seeing who is using the site..
- Next by Date: Re: seeing who is using the site..
- Previous by thread: seeing who is using the site..
- Next by thread: Re: seeing who is using the site..
- Index(es):
Relevant Pages
|