Image management system in PHP 5.4