logu Posted December 25, 2008 Share Posted December 25, 2008 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 Link to comment https://forums.phpfreaks.com/topic/138392-solved-php-download-script-unknown-time-remaining/ Share on other sites More sharing options...
rhodesa Posted December 25, 2008 Share Posted December 25, 2008 it's Content-Length not Content-Size Link to comment https://forums.phpfreaks.com/topic/138392-solved-php-download-script-unknown-time-remaining/#findComment-723659 Share on other sites More sharing options...
logu Posted December 26, 2008 Author Share Posted December 26, 2008 Thanks man , It works fine now. Link to comment https://forums.phpfreaks.com/topic/138392-solved-php-download-script-unknown-time-remaining/#findComment-723839 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.