Rabu, 03 November 2010

skrip timer

after we give an example calendar php script, then we can make a timer using php which we paste on our site, so please write the php code below and run it with your php program
<html>
<head>
<title>Skrip Timer</title>
</head>
<body>

<?php
      $mtime = microtime();
      $mtime = explode(' ', $mtime);
      $mtime = $mtime[1] + $mtime[0];
      $starttime = $mtime;
?>

<?php
      $mtime = microtime();
      $mtime = explode(" ", $mtime);
      $mtime = $mtime[1] + $mtime[0];
      $endtime = $mtime;
      $totaltime = ($endtime - $starttime);
      echo 'This page was created in ' .$totaltime. ' seconds.';
?>
</body>
</html>

please open your browser you will see the results, please expand

Tidak ada komentar:

Posting Komentar