Re: How to know how long a person stay

From: Date: Sat, 08 Dec 2001 04:04:04 +0000
Subject: Re: How to know how long a person stay
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-10801@lists.php.net to get a copy of this message
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 > >

« previous php.windows (#10801) next »