I have a WordPress 'weather-cam' page. The page shows the most recent 10 photos of our webcam (for 3 webcams in total). The images are updated every 10 minutes by uploading them via FTP to a server. The images are numbered from image0.jpg to image9.jpg and are being updated in a cyclic fashion: eg image7.jpg is uploaded, 10 minutes later image8.jpg is uploaded, 10 minutes later image9.jpg is uploaded, 10 minutes later image0.jpg is uploaded etc.
I want to display the images in chronological order and with the time they were taken/uploaded mentioned under the photo.
An older version of the website (in Umbraco) was using .aspx (which, being a C# programmer, I fully understand) but I know absolutely nothing about .php. The old version would call a function that would return a list of strings with the filenames prefixed by ? and then the number of ticks since a start date. The website would then dynamically use that list to display the images in the correct order with the correct time and make sure no cached image was used.
Example of such a returned list (sample values): image0.jpg?12345678, image9.jpg?12345677, image8.jpg?12345676, image7.jpg?1234565 etc.
The ?12345678 would be converted back to the date and cause the browser to reload the image and not used cached ones.
How could I achieve the same thing using WordPress/php.
To show you what I mean:
You'll notice that the new site has just a static display of the date and the images are not in chronological order (they just go from 9 down to 0).
I've though about writing some C# code that I would run on my own personal server which would return the sorted list and timestamps and then manually adjust a MyWeathercam.html file on my personal server (this would certainly work) but linking to that MyWeathercam.html in an makes it look all wrong and so does linking to the MyWeathercam.html instead of the page because it would totally ignore the installed theme.
Maybe my question could also be: how can I 'inline' code dynamically in a WordPress page? Or: how to dynamically (programmatically) update the contents of a WordPress page?
I hope this makes some sense. Any help is greatly appreciated.