title: PHP Real file type
body: <p>I am building a website where the user can upload mp3 files. And, I want to check if the file is a mp3 file. What I need to know is if there is a php function that do that for me.</p>
  
  <p>I tried  <code>$_FILES['uploadedfile']['type']</code></p>
  
  <p>But, I does not work like I want, because it returns the file type based on the extension (I tested it only on windows)</p>
  
  <p>So, the questions are:</p>
  
  <ol>
  <li>There is a safe way to do that with php native functions??</li>
  <li>The file type based on extension, is a php issue or is related to the OS?</li>
  <li>What do you recomend to me??</li>
  </ol>
  
  <p>Thanks.</p>