title: How can find image type without extension in php?
body: <p>I have image upload php class. This process uploaded Images(.png,jpeg,.gif).
               I am using this function to find image type</p>
  
  <pre><code> function getImageType($image_name){
      return end(explode('.',$mage_name));
                }
  </code></pre>
  
  <p>if someone upload any file with fake extension . error will happen. How can i Check type of image without
              checking extension?</p>