PDA

View Full Version : Can someone write me a html?



jmg823
01-27-2004, 01:33 PM
I need it to count down time from the curent time down to feb 4 @4:00pm(us, central)

thanks,
jmg823

Peckers
01-28-2004, 06:12 AM
you can't make a counter in HTML, you'd have to use JSP, ASP or PHP.
Do you have support for any of these on your homepage? If you do, http://www.hotscripts.com/ is a good place to find scripts.

jmg823
01-28-2004, 09:29 AM
ya i think i have support for php but have no experence with it and need this written for me. That date is when i get my cast off:D

Peckers
01-28-2004, 09:59 AM
A google search came up with a bunch of counters, I think http://www.jholman.com/scripts/rcdown/ might be something for you, all you have to do is fill in you parameters, it will host the counter for you so you don't even need to have PHP installed!

If you have PHP installed you could use this, it's is the code I used for my HL2 countdown, still waiting for the release :p:


<?php
echo("<html>");
echo("<title>HL2 Countdown_v1.4</title>");
$hl2_diff=mktime(0,0,0,9,30,2003)-mktime();
$hl2_sec = $hl2_diff % 60;
$hl2_min_tmp = $hl2_diff / 60;
$hl2_min = $hl2_min_tmp % 60;
$hl2_hr_tmp = $hl2_min_tmp / 60;
$hl2_hr = $hl2_hr_tmp % 24;
$hl2_dy = $hl2_hr_tmp / 24;

if($hl2_diff <= 0)
{
echo("<h1>It has arrived!</h1>");
}
else
{
echo("Half-life 2 Countdown: ");
echo((int)$hl2_dy);
if($hl2_dy == 1) { echo(" day, "); }
else { echo(" days, "); }
if($hl2_hr < 10) {echo("0");}
echo($hl2_hr);
if($hl2_hr == 1) { echo(" hour, "); }
else { echo(" hours, "); }
if($hl2_min < 10) {echo("0");}
echo($hl2_min);
if($hl2_min == 1) { echo(" minute, "); }
else { echo(" minutes, "); }
if($hl2_sec < 10) {echo("0");}
echo($hl2_sec);
if($hl2_sec == 1) { echo(" second."); }
else { echo(" seconds."); }
}
echo("</body>");
echo("</html>");
?>

jmg823
01-28-2004, 02:00 PM
thanks peckers