Happy New Year 2013 simple Count Down script in php
<?php /* Online PHP Examples with Source Code website: http://4evertutorials.blogspot.in/ */ $day = 1; $month = 1; $year = 2013; //change for next year $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 2013:)";} ?>
0 comments:
Post a Comment