title: How to show remaining time of downloading and total file size in browser?
body: <p>I have this code:</p>
  
  <pre><code>$file="http://domain/path/file.flv?hash=hashcode";
  
  header('Content-Type: video/x-flv');
  
  header('Content-Disposition: attachment; filename=myvideo.flv' );
  
  readfile($file);
  </code></pre>
  
  <p>And when I access download.php it starts downloading, and in the browser shows:</p>
  
  <p>1 KB, 2 KB, ... 1MB, 2MB, ....</p>
  
  <p>What I want to know is how to show the text below in the browser when downloading the file, something like this: </p>
  
  <p>2MB/29MB remaining 5 minutes...</p>
  
  <p>I mean, at the bottom of the browser (where the file is downloading) - Chrome, or in the "Downloads" window - Firefox</p>
  
  <p>I tryed this:</p>
  
  <pre><code>header('Content-Length: ' . filesize($file));
  </code></pre>
  
  <p>but it doesn't work.</p>