* User

Welcome, Guest. Please login or register.
Did you miss your activation email?

08 Sep 10, 14:42:02

Login with username, password and session length

Select language:

* Recent Topics



Donate

Donate for PortaMx !
Your donation is safe and helps support the issues and causes you care most about.

* Stats

  • *Total Members: 2448
  • *Latest: ElNikez

  • *Total Posts: 10789
  • *Total Topics: 1629
  • *Online Today: 20
  • *Most Online: 157
(27 Aug 09, 03:54:53)
  • *Users: 0
  • *Guests: 20
  • *Total: 20

Author Topic: Site online since...  (Read 1046 times)

0 Members and 1 Guest are viewing this topic.

Offline Cool

  • Free Tibet
  • Charter Member
  • *
  • Posts: 654
  • Gender: Male
  • I Hate Chinas Authority
Site online since...
« on: 22 Dec 08, 11:27:34 »
...to display how long your site is up
just put the following code in a php-block:
Code: [Select]
$time_diff = time() - strtotime("2008-12-01 00:00:00");

$tage = ($time_diff - $time_diff%86400)/86400;
$rest_zeit = $time_diff - $tage*86400;
$stunden = ($rest_zeit - $rest_zeit%3600)/3600;
$rest_zeit = $time_diff - $tage*86400 - $stunden*3600;
$minuten = ($rest_zeit - $rest_zeit%60)/60;
$rest_zeit = $time_diff - $tage*86400 - $stunden*3600 - $minuten*60;
$sekunden = $rest_zeit;

echo "<b>Homepage online since:</b><br>";
echo $tage." Days<br>";
echo $stunden." Hours<br>";
echo $minuten." Minutes<br>";
echo $sekunden." Seconds<br>";

you just have to set the date (and time if you want) in the first line:
Code: [Select]
$time_diff = time() - strtotime("2008-12-01 00:00:00");
Site:FikaGuide(Sv)|I Use:V0.980|SMF 2.0 RC3
Q: What do you do when you see a bear in the woods?
A: Play Dead!

EEE-PC:1000H-1TB_WD-2GB-Xp&Win7-BT_Gps-BT_Mouse-USB_Huawei_Hsdp

Offline Demon Slushy

  • Jr. Member
  • **
  • Posts: 59
  • Gender: Male
    • DarkVoid Poetry
Re: Site online since...
« Reply #1 on: 27 Dec 08, 01:37:46 »
Very Cool

Thanks for sharing ^_^

Offline kcmartz

  • Owner/Kcmartz.com
  • Newbie
  • *
  • Posts: 46
  • Gender: Male
  • Kcmartz.com Owner/Founder
    • Kcmartz's Site
Re: Site online since...
« Reply #2 on: 29 Mar 10, 23:03:49 »
Bookmarked (sorry for bringing up a old topic!)
Thanks,
Kcmartz