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.
more info about the class
See all posts See thread Reply
$tempfile = $handle->file_src_pathname;
$exif = exif_read_data($tempfile, 0, true);
$exif = exif_read_data($_FILES['Filedata']["tmp_name"]); if(!empty($exif['Orientation'])) { switch($exif['Orientation']) { case 8: echo 2; $handle->image_rotate = 270; break; case 3: echo 3; $handle->image_rotate = 180; break; case 6: echo 4; $handle->image_rotate = 90; break; } }
And for those looking to view the EXIF data of a photo use this line. It'll make an array called $exif