RE: [PHP] Time in php problem....

From: Date: Mon, 12 Feb 2001 17:54:38 +0000
Subject: RE: [PHP] Time in php problem....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39243@lists.php.net to get a copy of this message
All I can tell is that there's a pain of calculating when the user leaves the site. Let's say his connection drops. What's then? How do you know he didn't spend on that page 7 hours? I think you should have a file included in every page he visits which, using sessions, adds the TimeStamp to the database. Then you can see - if session exists means he continues, if not then this is the first time he is in. Something like that. Put all in the database and play with it later-on. As of the rest, I think you can do it all. The only concern is for you to accept that his last record is a hit of a page (or log-of button) and not his closing window. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) maxim@phpbeginner.com www.phpbeginner.com -----Original Message----- From: Ng Kok Chun [mailto:ramnkc@yahoo.com] Sent: Tuesday, February 13, 2001 5:11 PM To: php-general@lists.php.net; ts@cape.com; tgolden@checkfreeinvsvcs.com; john@edlabs.com; andre.feld@gmx.de; "mailto:webmaster"@dark-library.com; tomb@atlantic.net Subject: [PHP] Time in php problem.... hi... i need some help... currently i doing web base programming ( econsultant )using php, apache and mysql as well... now i facing a problem which i need : 1) get time when consultant log on 2) get time when consultant log off 3) calculate how long for the specified consultant been log on to the web 4) accumulate all the time everyday 5) then multiple accumulate with working rate ( X ). 6.) finally output to web ( html form ) pls help ! thanks !

« previous php.general (#39243) next »