// CoUnTdOwN script created by: Xander Ladage (2006)
// Give timepeaces for the event you want to count down to
// You can also perform some action between two moments
// (for instance do something for just one month)
// Please do not remove this peace of comment!
// SIMPLY COUNTDOWN to some moment:
$year = 2009;
$month = 12;
$day = 31;
$hour = 23;
$minute = 59;
$second = 59;
countdiff($year,$month,$day,$hour,$minute, $second);
function countdiff($y, $mo, $d, $h, $m, $s){
$cdate = mktime($h, $m, $s, $mo, $d, $y, -1);
$today = time();
$difference = $cdate - $today;
if ($difference == 0 || $difference < 0 ){
echo '
WE MADE IS !!! COUNTER MOMENT IS REACHED !!!';
} else {
$dleft = floor($difference/60/60/24);
$hleft = floor(($difference - $dleft*60*60*24)/60/60);
$mleft = floor(($difference - $dleft*60*60*24 - $hleft*60*60)/60);
$sleft = floor(($difference - $dleft*60*60*24 - $hleft*60*60 - $mleft*60));
$countdowndate = date("l j F Y, G:i:s",$cdate);
$currenttime = date("j F Y, G:i:s",$today);
echo '
| Current time is: | '.$currenttime.' |
| We are counting down to: | '.$countdowndate.' |