title: How to detect shot angle of photo, and auto rotate for website display like desktop apps do on viewing?
body: <p>If I take a photo with a camera it stores the orientation/angle of the apparatus so when I view the image on the PC with a good app, it shows auto-rotated to 0.</p>
  
  <p>But when I upload to a website it shows the original angle, so the image doesn't look good.</p>
  
  <p>How can I detect this with PHP and rotate the image, and clear this angle flag from it's meta information.</p>