Jump to content

[SOLVED] php download script - unknown time remaining


logu

Recommended Posts

Hi,

 

In my download script i used

  header('Content-Size: '.$filesize );

even during download the browser says unknown time remaining

 

Is there anything i have to do to get this done.

Please give u r suggestions

 

My code is

  $filesize = filesize($filename);
  $handle = fopen($filename, "r");
  $contents = fread($handle, $filesize );
  fclose($handle);

  $farr = explode("/",$filename);
  $dowload_file_name = $farr[count($farr)-1];

  header('Content-Size: '.$filesize );
  header('Content-type: audio/mpeg');
  header('Content-Disposition: attachment; filename="'.$dowload_file_name.'"');

  echo $contents;

 

Thanks

Logu

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.