I make cakes and my website is a gallery of the cakes I've made, sorted into categories using PHP. My latest coup was to have the homepage list the three newest cakes (using a recursive directory listing script).
Ideally, I would like to have each gallery listed in reverse order of the date the cake was made (i.e. newest first, oldest last).
It seemed to me that the easiest way to do this was to set the filedate of each image file to the date the cake was made, gather up a list of the images, reverse sort them and then display them. Easy, right?
The only kink in this is that obviously when I upload the image files to the server, the file date is changed to the current date, making all my hard work on the file dates moot (I learned that the hard way, after manually changing the file dates of over 100 files only to find that once I uploaded them, the file had changed to the current date).
Any ideas on how to accomplish what I'm looking to do would be appreciated, any secrets, any hints, any tips. Note the following, however:
(1) I can't get shell access to the server. My webhost advises me that due to some firewall issue, he can't give me shell access.
(2) It doesn't appear that the FTP server support MDTM.
(3) PHP's touch() command does not work to set the filedate to any date other than the current date.
(4) I really would prefer not to append the filedate to the image file name (although I am currently testing out adding a unix timestamp to the filename as a last resort).