Creating Websites That Work! Call Toll Free at 1-877-530-7993 For Assistance With Your Web Needs.
Design Solutions
E-commerce
Hosting Plans
Other Services
PHP - Countdown Script

1.) You can call this little script a number of ways.
   a.) Set the $day,$month,$year in the script and just call like yourdomain.com/timetill.php.

   b.) Use it either directly or as a function in your php files.

   c.) Comment out the following lines like this
     //$day = 16; // Day of the countdown
     //$month = 7; // Month of the countdown
     //$year = 2001; // Year of the countdown
   Call the script like this yourdomain.com/timetill.php?day=5&month=2&year=2001.

<?

$day = 16; // Day
$month = 7; // Month
$year = 2001; // Year

if ($month == 1) $month_name= "January";
if ($month == 2) $month_name= "February";
if ($month == 3) $month_name= "March";
if ($month == 4) $month_name= "April";
if ($month == 5) $month_name= "May";
if ($month == 6) $month_name= "June";
if ($month == 7) $month_name= "July";
if ($month == 8) $month_name= "August";
if ($month == 9) $month_name= "September";
if ($month == 10) $month_name= "October";
if ($month == 11) $month_name= "November";
if ($month == 12) $month_name= "December";

print ("There are " . (int)((mktime (0,0,0,$month,$day,$year) - time(void))/86400) . " days until & $month_name $day, $year");

?>

 

Learning Center
About Us
Create-A-Website provides you with professional custom web solutions at affordable prices!