How do you make a countdown clock?

RoboRocks

Chairman of Selectors
Joined
Mar 21, 2005
Location
Redditch, England
Online Cricket Games Owned
Just something useful for me to know.

I would like one for the ashes and for the release of WWE Smackdown vs Raw 2007.
 
You can use javascript ones for webpages
And there are tutorials on the internet to make flash countdown timers
 
Prakash helped me make a php one before.
Here is the code:

Code:
<?php
$end = mktime(2,30,0,7,22,2005);

$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 '<br>Time left: ' . $r2[0] . ':' . $r3[0] . ':' . $r4[0];
$image = "ashes2.jpg";
$im = imagecreatefromjpeg($image);
$colour  = ImageColorAllocate ($im, 255, 0, 0);
ImageString($im, 3, 125, 130, "$r1[0] Days $r2[0] Hours $r3[0] Minutes", $colour);
header("Content-Type: image/jpeg"); 
Imagejpeg($im,'',100); 
ImageDestroy ($im); 
?>
 

Users who are viewing this thread

Top