for my countdown timer i currently have written up
<?php
header( 'refresh: 1; url=countdown.php' );
// countdown function
// parameters: (year, month, day, hour, minute)
countdown(2008,10,14,16,50);
function countdown($year, $month, $day, $hour, $minute)
{
// make a unix timestamp for the given date
$the_countdown_date = mktime($hour, $minute, 0, $month, $day, $year, -1);
// get current unix timestamp
$today = time();
$difference = $the_countdown_date - $today;
if ($difference < 0) $difference = 0;
$days_left = floor($difference/60/60/24);
$hours_left = floor(($difference - $days_left*60*60*24)/60/60);
$minutes_left = floor(($difference - $days_left*60*60*24 - $hours_left*60*60)/60);
// OUTPUT
echo "Today's date ".date("F j, Y, g:i a")."<br/>";
echo "Countdown date ".date("F j, Y, g:i a",$the_countdown_date)."<br/>";
echo "Countdown ".$days_left." days ".$hours_left." hours ".$minutes_left." minutes left";
}
?>
you can see my refresh but if i get over 100-2k people using it that would be stupid to do and somewhat more demanding on the server. Please help me with different solutions and ideas. Thanks for those that reply. and no this isnt for school.
This post has been edited by sunshinekiller: 14 October 2008 - 03:40 PM

New Topic/Question
Reply




MultiQuote





|