Re: RE: Site Sesions: Online/off...

From: Date: Fri, 20 Apr 2001 23:44:53 +0000
Subject: Re: RE: Site Sesions: Online/off...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-49622@lists.php.net to get a copy of this message
If you want to make it easy on yourself, convert it into a timestamp (unix preferably). Then all you have to do is: $dif = time() - $last_access_time; if ($dif > 3600) { echo "The user has been inactive for more than an hour."; } That's if you want to make it easy on yourself. If you're a masochist I suppose you could play around with mktime() :) -- Plutarck Should be working on something... ...but forgot what it was. ""Richard"" <oblivion@lunamorena.net> wrote in message news:9bpbf3$fc$1@toye.p.sourceforge.net... > Greetings. (the thread was too far down to be read by anyone) > > I am having some problems with the code itself! I have done like so, > that whenever peopel wishes to see the "onliners", I start a function called > DelOld(). This will not decrease server speed, nor create conflicts when > writing to temporary files and so forth. > Now, I tried to gather the following into an exploded array: > > // the date output > $date_output = date("Y-m-d-H-i-A"); > > As you see, I've seperated all with a "-" so I can simply call [0], [1], > [2],... if I want something. Now, How can I compare if a user is away for > like 10 minutes, or 30 minutes? I have a function called > GetLoggDateofUser($Username) which will retreive the $date_output, but with > colons and spaces, like so: > date("Y-m-d H:i A"). > > Do you or anyone else have any suggestions? > > - Richard > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#49622) next »