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.
The class doesn't carry EXIF data over to the new images (the feature is planned, but not implemented yet). However, you can do it outside of the class.Reply