Re: How to know how long a person stay
| From: | Michel Laine | Date: | Mon, 10 Dec 2001 11:48:38 +0000 |
| Subject: | Re: How to know how long a person stay | ||
| References: | 1 2 3 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-10821@lists.php.net to get a copy of this message | ||
Hey! don't blame me....
I am just a newbie trying to help.
...and let me point out that i said "I do not believe that this is possible,
not as you would it to work anyway." - Where is the text saying that it *can't*
be done?
PHP still amazes me after one year. I'm on your side - "Anything is possible"
Gerald Davis wrote:
> NEVER SAY it is impossible. Anything is possible
>
> Michel the question is do you want to do the work needed?
>
> 1) setup a simple static "testbed" website. With index.html and 4-5
> page1-5.html
> 2) setup the site to use the built in sessions feature of php4. If you
> don't know what this is stop, and read manual or a good boook on php
> 3) don't call the pages directly. Create a script that is passed the page
> you need as a variable.
> i.e pages.php?p=index.html would grab the index.html page.
> a) Have the script record the page, the "on time" (that is time page is
> loaded first), and the session_id into a mysql database.
> b) Have the script check to see if that session_id was on any other pages.
> if so and there is no off-time then the on-time for this page is the
> off-time for the old page.
> c) Have the script parse the page and change all the direct links to
> page.php links. I.e if the script sees page1.html it would change that to
> page.php?p=page1.html
>
> Now all your data is trapped in a mysql database
> You should be able to write a simple script to extract it into some
> meaningful reports, or a csv for further processesing.
>
> ANYTHING is possible with PHP & MySQL.
>
> Gerald
>
> "Michel Laine" <michel@systemtech.se> wrote in message
> news:3BFA8947.447395F7@systemtech.se...
> > I do not believe that this is possible, not as you would it to work
> anyway.
> > Something like this might be realized with sessions set to a very short
> > timeout, but then your users might get pissed (due to the short timeout).
> >
> > Patrick Silva wrote:
> >
> > > Hello
> > >
> > > is it possible with PHP to know how much time a person stay on a web
> page?
> > >
> > > thanks
> > > /---------------------------------------------/
> > > Patrick Silva
> > > Gestion serveurs et domaines
> > > Cyse Informatique
> > > 105 avenue du Général Leclerc
> > > 77400 Lagny sur marne (France)
> > > tel : (33)1 64303232 - Fax : (33)1 64303222
> > > tel : (33)5 55805498 - Fax : (33)5 55805499
> > > E-mail : psilva@cyse.net
> > > http://www.cyse.com
> > > /---------------------------------------------/
> >
> > --
> >
> > Michel Laine
> >
> >
--
Michel Laine
Engineer / Network Administrator
SYSTEM TECHNOLOGY SWEDEN AB
Phone:(+46)-8-982255
Fax:(+46)-8-982060
Snail mail: Vretenvagen 2, 171 54 SOLNA, SWEDEN
E-mail: michel@systemtech.se
WWW: http://www.systemtech.se