You are here: Re: TIME calculation please :-/ « All PHP « IT news, forums, messages
Re: TIME calculation please :-/

Posted by J.O. Aho on 09/23/07 07:12

Beshoo wrote:
> TIME calculation please :-/
>
> hi gaiz !!
> just aim trying to make a fucntion to calculate a period of time
> aim making trfic website analysis I mean for example i must know
> when a user is logedon and logedOut So i can know the period he
> has spent in the site !!! ??
> Ofcourse i have the to time[when he login and logout] i am tring to
> make fucntion to caleculate the period between thes 2 time !!!!
>
> fore example i have loged in at :
>
> 12:30
> and logged out at :
> 1:10
>
> there must be 40 mints !!??
> i wirte my script bt it has alot of problems!!

quite simply you could convert the two times to unixtime and then:
unixtime_logout - unixtime_login = seconds between login and logout

then you have only to convert the seconds to days/hours/minutes/seconds

--

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация