Page 1 of 1

unknown time remaining (force download)

Posted: Fri Apr 01, 2011 7:26 am
by ykach
im using this code:

Code: Select all

<?php
set_time_limit(0); 
$file = 'test.mp3'; 


header('Content-Description: File Transfer');
header("Content-Disposition: attachment; filename=\"$file\"");
header('Content-Type: audio-x/mp3');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . filesize($file));
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Expires: 0');


readfile($file);
?>

when downloading i cant see the progress bar.

thanks.