PHP script to analyze images in a directory.