Hello I have a webcam 'foscom' that send automatic snapshot every 30minutes a pictures to this folder in my ftp "testcamera/img"
I was able to create a code that display the latest image uploaded in php.
But i want also to display a drop down menu that display all old image that's mean i will let the viewer to choose another picture and display it. An example of the idea i want: http://www.skileb.com/webcam/mzaarv/ My Sample look like this: www.stevendahdah.com/testcamera/index.php
So anyone can help me?
Here is a link that will get you started :
Getting the first or last file is merely getting the correct element from your sorted array :
$latest_file = $files[1];
$oldest_file = $files[count($files)];
You can create a image tag
echo '<img src="/dir/where/files/are/'.$latest_file . '" />';
For the rest, you can create links
for ($i = 2; $i <= count($files); $i++) {
echo '<a href="/dir/where/files/are/'.$latest_file . '" />' . $latest_file . '</a>';
}