View Single Post
  #2 (permalink)  
Old 06-10-2008, 07:45 AM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 20
Posts: 3,568
Last Blog:
Tidy up your HTML
Credits: 0
Rep Power: 20
John has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond repute
Send a message via AIM to John Send a message via MSN to John
Default Re: How to start this?

I do not believe the file has an attribute of when it was created - it does have an attribute of when the file was last accessed and last written to (PHP: fileatime - Manual and PHP: filemtime - Manual ). The first thing that jumps out at me is to use a database. Store the file name, date it was created, and any other pertinent information regarding the image in the database. With SQL you can use ORDER BY on the date created column and you are pretty much done - you can even add a LIMIT 20 to only show 20 images. The other possibility is to store a timestamp as part of the images name: untitled-1213098600.jpg. Then just sort by the timestamp.
Reply With Quote