My Web Cam Example

Image Uploaded: April 20 2009 13:11:55 ADT

Here's the source code for this Sample:

<html>
<head>
<title>Sample Web Cam 1</title>
</head>
<body>

    <-- Start of PHP code -->

<?php
$filename = 'drive61.jpg';
if (file_exists($filename)) 
{
    //-- use TZ only if your server uses GMT time -->
putenv("TZ=America/Anchorage"); echo "<center><font size=\"6\">My Web Cam Example</font></center><br>";
//-- Here are the lines that timestamp the image -->
echo "<font size=\"3\"><center>"; echo "Image Uploaded: " . date ("F d Y H:i:s", filemtime($filename)); echo " ADT</center>";
//-- Now we make the table and display the image -->
echo "<table align=\"center\" border =\"2\"><TR><TD>"; echo "<img src=\"$filename\" >"; echo "</font></center></td></tr></table>"; clearstatcache(); } ?> <!-- End of PHP code --> </body> </html>
Of course, file extension must be .PHP for this to work!