display image with newest date
Posted: Mon Oct 07, 2002 4:33 am
Hey there
I run a gallery site, and on the main index.html of my site I need a script to display the image with the newest date, pulled from a specified directory (where all images from the gallery are stored). Basically showing everyone the last image that has been uploaded and attract users into the gallery. Anyone know where I would start with this? I could also pull the image based on the highest alphabetized name, since the gallery program renames all files in alpha order (ie: aa.jpg, ab.jpg, ac.jpg etc).
Using the filenames seems to be the more reliable way in case i have to alter an image and then reupload it, I wouldnt want it to show on the main page again just because the date had changed by me messin with the pic.
My site is ran on Unix, and php 4.22
I couldnt find anything in the manual or in the archives of this forums.
Thanks for any help or hints
I run a gallery site, and on the main index.html of my site I need a script to display the image with the newest date, pulled from a specified directory (where all images from the gallery are stored). Basically showing everyone the last image that has been uploaded and attract users into the gallery. Anyone know where I would start with this? I could also pull the image based on the highest alphabetized name, since the gallery program renames all files in alpha order (ie: aa.jpg, ab.jpg, ac.jpg etc).
Using the filenames seems to be the more reliable way in case i have to alter an image and then reupload it, I wouldnt want it to show on the main page again just because the date had changed by me messin with the pic.
My site is ran on Unix, and php 4.22
I couldnt find anything in the manual or in the archives of this forums.
Thanks for any help or hints