Icey the pirate. arrr
- Joined: Feb '03
- Posts: 1,455
- Type: Administrator
| Here you go people. Save this into something like countdown.php and then use this on your main page:
Code:
<? include("countdown.php"); ?>
Code:
<?
// Countdown // Written by ICEY // http://icey.gouranga.com // icey@gouranga.com // feel free to use anywhere
/* SETTINGS */
// hour, minute, second, month, day, year $destcount = mktime(0,0,0,5,16,2003);
// released message $isreleased = "VC For PC Released In Europe!";
// unreleased message $unreleased = "Until European VC On PC Released!";
/* MAIN CODE */
// get current time as array $curtime = explode(" ", microtime());
// find the time difference $totaltime = $destcount - $curtime[1];
// check if it has been released if ($totaltime <= 0) {
// vc has been released so tell the world! echo($isreleased);
// vc hasnt been released, so run the following code instead } else {
// divide the total time by the number of seconds in a day $daysleft = intval($totaltime / 86400);
// get the time minus days $timeleft = ($totaltime - ($daysleft * 86400));
// get the hours, minutes and seconds $timeleft = date("H:i:s", $timeleft);
// output the data echo($daysleft . " Days, " . $timeleft . " " . $unreleased);
// end check to see if vc has been released on pc }
?> ------------------
 |
|---|