Original script
Link to "http://www.2nt.free.fr/host/jaunty/countdown.php" for this script
<?php
date_default_timezone_set("America/New_York");
header("Content-Type: image/png");
$month = date("n");
if ($month == 4)
$day = 23 - date("d");
else if ($month == 3)
$day = 31 - date("d") + 23;
else
$day = -1;
if ($day < 0)
readfile("http://www.ubuntu.com/files/countdown/904/countdown-9.04-1/here.png");
else if ($day == 0)
readfile("http://www.ubuntu.com/files/countdown/static.png");
else if ($day >= 10)
readfile("http://www.ubuntu.com/files/countdown/904/countdown-9.04-1/".$day.".png");
else
readfile("http://www.ubuntu.com/files/countdown/904/countdown-9.04-1/0".$day.".png");
?>
Version using redirects instead of readfile (uses less bandwidth on the server)
Link to "http://www.2nt.free.fr/host/jaunty/countdown2.php" for this script
<?php
date_default_timezone_set("America/New_York");
$month = date('n');
if ($month == 4)
$day = 23 - date('d');
else if ($month == 3)
$day = 31 - date('d') + 23;
else
$day = -1;
if ($day < 0)
header("Location: http://www.ubuntu.com/files/countdown/904/countdown-9.04-1/here.png");
else if ($day == 0)
header("Location: http://www.ubuntu.com/files/countdown/static.png");
else
header("Location: http://www.ubuntu.com/files/countdown/904/countdown-9.04-1/".str_pad($day, 2, '0', STR_PAD_LEFT).".png");
?>
MadsRH's calendar - source using redirects
Link to "http://www.2nt.free.fr/host/jaunty/calendar.php" for this script
<?php
date_default_timezone_set("America/New_York");
$month = date("n");
if ($month == 4)
$day = 23 - date("d");
else if ($month == 3)
$day = 31 - date("d") + 23;
else
$day = -1;
if ($day < 0)
header("Location: http://www.ubuntu.com/files/countdown/904/countdown-9.04-2/here.jpg");
else
header("Location: http://www.ubuntu.com/files/countdown/904/countdown-9.04-2/".str_pad($day, 2, "0", STR_PAD_LEFT).".jpg");
?>