i want codeing countdown for wap 1.0 by php
help me plz ?
help me plz ?
<?
$day = 1;
$month = 1;
$year = 2006;
$end = mktime(0,0,0,$month,$day,$year);
$today= mktime(date("G"),date("i"),
date("s"),date("m"),date("d"),date("Y"));
$days=($end-$today)/86400;
if ($days>0) {
$r1 = explode('.',$days);
$hours=24*($days-$r1[0]);
$r2 = explode('.',$hours);
$minutes=60*($hours-$r2[0]);
$r3 = explode('.',$minutes);
$seconds=60*($minutes-$r3[0]);
$r4 = explode('.',$seconds);
echo 'Days left: ' .$r1[0];
echo '<br>Time left: ' . $r2[0] . ':' . $r3[0] . ':' . $r4[0];
} else {
echo "Happy new year:)";}
?>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card ontimer="#card1" id="card0" title="Counting..."> <timer value="10"/> <p>Time:10</p> </card> <card ontimer="#card2" id="card1" title="Counting..."> <timer value="10"/> <p>Time:9</p> </card> <card ontimer="#card3" id="card2" title="Counting..."> <timer value="10"/> <p>Time:8</p> </card> <card ontimer="#card4" id="card3" title="Counting..."> <timer value="10"/> <p>Time:7</p> </card> <card ontimer="#card5" id="card4" title="Counting..."> <timer value="10"/> <p>Time:6</p> </card> <card ontimer="#card6" id="card5" title="Counting..."> <timer value="10"/> <p>Time:5</p> </card><card ontimer="#card7" id="card6" title="Counting..."> <timer value="10"/> <p>Time:4</p> </card> <card ontimer="#card8" id="card7" title="Counting..."> <timer value="10"/> <p>Time:3</p> </card> <card ontimer="#card9" id="card8" title="Counting..."> <timer value="10"/> <p>Time:2</p> </card><card ontimer="#download" id="card9" title="Counting..."> <timer value="10"/> <p>Time:1</p> </card> <card title="Download" id="download"> <p>Thankyou for downloading with wapside:<br/><a href="download.ext">Download File</a></p> </card> </wml>
Demo: http://wapside.net/Countdown_Timer.wml
Comment