PHP Zeitanzeige programmieren

Post Reply
Message
Author
elitemassacre
Posts: 11
Joined: 17. Feb 2002 18:13
Contact:

PHP Zeitanzeige programmieren

#1 Post by elitemassacre »

Hallöchen,

könnt ihr mir vielleicht mal ein php-script aufschreiben, dass die Zeit in Sekunden ab einem bestimmten Datum ausgibt. z.B. "Diese Seite exisitiert seit xxxxx Sekunden"
Ich habe keine solche Funktion gefunden.

Danke schön

thorsten
Posts: 72
Joined: 23. Jan 2002 13:54

Re: PHP Zeitanzeige programmieren

#2 Post by thorsten »

Hallo,
lade dir mal folgende Class runter:
<a href="http://www.phpinsider.com/php/code/Date ... 2.4.tar.gz" target="_blank"><!--auto-->http://www.phpinsider.com/php/code/Date ... <!--auto-->
Diese bindest du in dein PHP File ein und:
<blockquote><pre><font size="1" face="">code:</font><hr><font face="Courier New" size="2">
$day1 = "01";
$month1 = "01";
$year1 = "2002";
$day2 = "01";
$month2 = "02";
$year2 = "2002";
$seconds = (((Date_Calc::dateDiff("$day1","$month1","$year1","$day2","$month2","$year2") * 24) * 60) * 60);
</font><hr></pre></blockquote>

Gruß

Thorsten

Post Reply