title: difference between move_uploaded_file AND is_uploaded_file
body: <p>When uploading a file from a php form using</p>
  
  <pre><code>&lt;input name="xxx" type="file"&gt;
  </code></pre>
  
  <p>is it necessary to use the php function <strong>is_uploaded_file</strong> to check if it was uploaded via PHP's HTTP POST upload mechanism?</p>
  
  <p>I've read all there is to read about that function and i don't see the use? Am i wrong?</p>
  
  <p>in the php documentation it says</p>
  
  <blockquote>
    <p>Returns TRUE if the file named by filename was uploaded via HTTP POST. This is useful to help ensure that a malicious user hasn't tried to trick the script into working on files upon which it should not be working</p>
  </blockquote>
  
  <p>but, the main function to upload the file <strong>move_uploaded_file</strong> also checks if it's a valid file</p>
  
  <blockquote>
    <p>This function checks to ensure that the file designated by filename is a valid upload file (meaning that it was uploaded via PHP's HTTP POST upload mechanism). If the file is valid, it will be moved to the filename given by destination.</p>
  </blockquote>
  
  <p>so, my question is the following:</p>
  
  <p>Is it really necessary to use <strong>is_upload_file</strong> if, presumably, <strong>move_uploaded_file</strong> already does the checking for malicious content ?</p>
  
  <pre><code>// if artwork file upload correctly, continue!
  if ($_FILES['artwork']['error'][0] == 0) {
  
      // check if the artwork file was uploaded via HTTP POST to prevent a malicious attack
      if (is_uploaded_file($_FILES['artwork']['tmp_name'][0])) {
  
         // move files
      }
  }
  </code></pre>