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"" <[EMAIL PROTECTED]> wrote in message
9bpbf3$fc$[EMAIL PROTECTED]">news:9bpbf3$fc$[EMAIL PROTECTED]...
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]