PHP-Downloadscript - download limit doesn´t work
<p>when i use this phpcode to download a file with a downloadspeed of 300Kb/s i use this:</p>

<pre><code> function readfile_chunked($dl_link, $filesize_file) {
  $chunksize = 300*1024; #Buffersize in Byte 
  $data = '';
  $handle = fopen($dl_link, 'rb');
    while (!feof($handle)) {
      $data = fread($handle, $chunksize);
      sleep(1);
      print $data;
      @ob_flush();
      @flush();
    }
  fclose($handle);
 }
</code></pre>

<p>But it doesn´t work! :-(</p>

<p>When i start the Download, the speed is under one KB/s and it breaks and then resume, and so on.</p>

<p>When i take off this "sleep(1)" in the code above, then the download starts and all is good, but it runs with fullspeed. -> logical!</p>

<p>Why is this?</p>
