I struggled for an elegant way to list directories and files by date with PHP. Here is the fruit of much Google-Fu. This will list directories and files from newest to oldest.
Archive of articles classified as' "PHP"Back home
This is the most elegant way I could find to create an thumbnail for an image I want to resize with PHP and Imagemagick. The function will return a filename.
To install imagemagick using Ubuntu, just run
sudo aptitude install php5-imagick