If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Rotating image expire

Yes, I am trying to create a web page that displays images in a certain directory and expire on the day of the file name.

files with the file names of 10-10-12.jpg, 11-13-12.jpg, 12-10-12.jpg, 01-12-13.jpg

I would like to read the directory and fine the newest date in this case is 10-10-12.jpg and display it until lets say 10:00pm of that day, then from 10:01pm it finds the next file of 11-13-12.jpg and display it until 10:01pm of the file date

Well, i think you want some image to appear on some date (or some time). Means you want to change them time by time. (Till I know) You can't do that with JUST file names. You have to use JavaScript and also specify that on which time you want to show which image, Okay?

First let us guess that you have images named "img1.jpg" , "img2.jpg" & "img3.jpg" and you want them to appear on 11th, 12th & 13th October, 2012 respectively. Then in your HTML:

HTML/JavaScript can't read directories. You'll need a script (PHP, Perl, Ruby, etc.) on the server that can handle that task. There are several different ways of getting that information to your webpage. You could make the webpage itself a PHP script that simply generates the appropriate JavaScript code required, or you could use JavaScript/AJAX to retrieve the data from the script.

Yes, something along those lines is what I am looking for. But what I want to do is to be able to upload files in a specific directory and give the pictures file names of the date that they will expire and have the script be able to find the next picture automaticaly and display it until the date of the file name and move to the next picture. I am trying to do this for a friend that all he wants to be able to do is put up the pictures and let the script to all the work.