boas, tenho este contador decrescente para colocar num blog wordpress
<?php
// countdown function
// parameters: (year, month, day, hour, minute)
countdown(2007,09,22,21,15);
//--------------------------
// author: Louai Munajim
// website: www.elouai.com
//
// Note:
// Unix timestamp limitations
// Date range is from
// the year 1970 to 2038
//--------------------------
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 "Faltam ".$days_left." dias ".$hours_left." horas ".$minutes_left." minutos";
}
?>
Mas o contador não está a funcionar, apenas aparece
Faltam 0 dias 0 horas 0 minutos
ou seja não está a contar, alguem sabe o que está mal?
obrigado