class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
I see that mime check is initially handled with fileinfo, which is available for 5.3+ - would it be possible to check with splfileinfo that is available since 5.1.2 so that wider compatibility is achieved (I have not tested this class - I do not know even if it is similar to fileinfo...)?
The default fall back with getimagesize offers great security for images though.Reply
The default fall back with getimagesize offers great security for images though.