Here is countdown script: k:
PHP Code:
$day = 1;$month = 1;$year = 2006;$end = mktime(0,0,0,$month,$day,$year);$today= mktime(date("G"),date("i"),date("s"),date("m"),date("d"),date("Y"));$days=($end-$today)/86400;
if ($days>0) {$r1 = explode('.',$days);$hours=24*($days-$r1[0]);$r2 = explode('.',$hours);$minutes=60*($hours-$r2[0]);$r3 = explode('.',$minutes);$seconds=60*($minutes-$r3[0]);$r4 = explode('.',$seconds);
echo 'Days left: ' .$r1[0];
echo '
Time left: ' . $r2[0] . ':' . $r3[0] . ':' . $r4[0];
} else {
echo "Happy new year:)";}?>
No comments:
Post a Comment