title: Retrieve image orientation in PHP
body: <p>How can I get the image orientation (landscape or portrait) of an image (JPEG or PNG) in PHP? </p>
  
  <p>I created a php site where users can upload pictures. Before I scale them down to a smaller size, I want to know how the image is orientated in order to scale it properly.</p>
  
  <p>Thanks for your answer!</p>