Contoh menghitung waktu mundur 60 detik refresh terus php

Menghitung waktu mundur /countdown.php

<META HTTP-EQUIV="refresh" CONTENT="1">
<?php
$endTime = mktime(60, 60, 0); //detik,milidetik;
$timeNow = microtime(true);
$diffTime = $endTime - $timeNow;


$sec = $diffTime % 60;
echo "<b>Sisa waktu Anda adalah  :</b>";
echo "<br/>";
echo $sec." detik ";
?>


Comments

Popular posts from this blog

Cara Mengatasi Galat: Index hilang pada kolom di phpMyAdmin

Program C++ Menghitung Diskon Pembelian oleh Pelanggan