Re: Session Time

From: Date: Mon, 10 Feb 2003 21:13:28 +0000
Subject: Re: Session Time
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-135113@lists.php.net to get a copy of this message
What you could do, is get the current time stamp using time() or date() and create a sesion variable with this value, when they login (and the session is created. Then when they logout, and the sesion is destoyed get the current time stamp again and minus it from the start time. Note: This requires the user to "login" and "logout", if they just close the browser then they will never get to your logour script, thus you can't calculate their money owed. "Stephen Craton" <webmaster@melchior.us> wrote in message news:004e01c2d11a$0e3a4590$0200a8c0@melchior... > Got a quick and easy question that I'm not sure about. What I need to do is > calculate how long someone has been in a chatroom, then update a members > table to add some "money" to their account. Something like this: > > For every hour they're in the chatroom: 5 cents > > Thanks, > Stephen Craton > http://www.melchior.us > >

« previous php.general (#135113) next »