0

i am trying to make force download of mp3 file instead of open in browser.

i am using the following code.

header('Content-Disposition: attachment; filename="' . $name . '"');
readfile($path);
exit();

This works fine, But the problem is resume/pause is not work and the total filesize/percentage is not mentioned when download the file. May i know how to fix this.

  • @hek2mgl i did'nt see the same question. please read my description. What problem i have. And please let me know the url of the question if its duplicate. Thanks. – Preet Panesar Mar 20 '15 at 17:57
  • You need to handle `HTTP_RANGE` and `content-length` headers. Just follow the most upvoted answer below that question and your problem is solved. – hek2mgl Mar 20 '15 at 18:05

0 Answers0