File "update.html"
Full Path: /home/analogde/www/New/update/update.html
File size: 608 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
$path = 'images/';
$last_time = 0;
$last_img = '';
$dir = opendir($path);
while($img = readdir($dir))
{
if (is_file($path.$img))
{
$date_file = filemtime($path.$img);
if ($date_file > $last_time)
{
$last_time = $date_file;
$last_img = $path.$img;
}
}
}
closedir($dir);
if ($last_img)
{
echo '<img src="' . $last_img . '" />';
}
?>
<html><head><meta HTTP-EQUIV="REFRESH" CONTENT="30">
<title>Ma webcam</title></head><body>
<img src="00.jpg">
</body></html>