An updating clock
This is a clock that updates, it actually merely does a refresh every 1 second, this is assuming that you create a file called clock.php and copy the examnple below into it
<HTML>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV=”refresh” CONTENT=1″; URL=clock.php”>
</HEAD>
<BODY>
<?php
Print “The time is: “;
$hour = date(’H'); //hours.
$minute = date(’i'); //minutes.
$seconds = date(’s’); //seconds
$time = “$hour : $minute : $seconds”; //put them together
Print $time
?>
</BODY>
</HTML>
Related posts:
- Convert 24 hour time to 12 hour time This example converts 24 hour formatted date to 12 hour...
- Ajax and PHP Stock Quote example This isĀ a new source code section so we thought...
- Get Dow Jones stock market data This example retrieves the latest Dow Jones data from Yahoo...
Related posts brought to you by Yet Another Related Posts Plugin.



















