We have a camera which uploads images to our webserver every 15 seconds. This static image is displayed on a page, and refreshed to show the latest image. This is uploaded as "webcam.jpg".

I'd like to change the upload such that it uploads a set number of images. This will up upload images as "webcam1_1.jpg" through to "webcam1_480.jpg".
Once 480 is uploaded, it resets to 1.
Ultimately I aim to wrap all 480 images into an 60 second loop of the previous 2 hours captured.

Is it possible to determine the newest image uploaded to the webserver and display this image each 15 second refresh?
For example if the latest image is webcam1_178, this image is displayed on the page. When next checked, it finds webcam1_179 and displays this image.
Date modified on the image includes the date and time uploaded.

I don't use PHP, but that's the language our webserver needs so I appreciate any help!