Here's the source code for this Sample:
<html>
<head>
<title>Sample Web Cam</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";
echo "</font></center><br>";
echo "<table align=\"center\" border =\"2\"><TR>";
// Make a table cell and put the image in the background
echo "<TD border= \"2\" width= \"640\" align= \"center\"; height= \"480
\" "; echo "background = \"$filename\" valign= \"top\"<b>";
echo "<span style=\"background-color: #FFFFFF\">";
// Now lets print the timestamp in the table cell
echo "<font size=\"3\">- Image Uploaded: " . date ("F d Y H:i:s",
filemtime($filename));
echo " ADT -</font></center></td></tr></table>";
clearstatcache();
}
?>
<!-- End of PHP code -->
</body>
</html>
Of course, file extension must be .PHP for this to work!
|