title: PHP Ajax Upload Progress Bar
body: <pre><code>&lt;form enctype="multipart/form-data" action="upload.php" method="POST"&gt;
  &lt;input name="uploaded" type="file" /&gt;
  &lt;input type="submit" value="Upload" /&gt;
  &lt;/form&gt;
  
  &lt;?php
  if(isset($_REQUEST['submit'])){
     $target = "data/".basename( $_FILES['uploaded']['name']) ;
     move_uploaded_file($_FILES['uploaded']['tmp_name'], $target);
  }
  ?&gt;
  </code></pre>
  
  <p>I know Javascript, AJAX and JQuery etc very well and I believe an upload progress bar can be created using PHP, AJAX and Javascript etc.</p>
  
  <p><strong>I am surprised how to get the size of upload (meaning each second I want to know, how much of the file is uploaded and how much is remaining, I think it should be possible using AJAX etc) file during upload is in process.</strong></p>
  
  <p>Here is link to the PHP manual but I didn't understand that:
  <a href="http://php.net/manual/en/session.upload-progress.php" rel="nofollow noreferrer">http://php.net/manual/en/session.upload-progress.php</a></p>
  
  <p>Is there any other method to show the upload progress bar using PHP and AJAX but without use of any external extension of PHP?  I don't have access to <code>php.ini</code></p>