Resuming Downloads
Posted: Fri Feb 22, 2008 5:50 am
Hello
The location of downloadable files on our website is hidden from the users. When they click a button to download a file a PHP script finds the file and starts the download. Our users would like to use download managers in order to resume a interrupted download. However when testing our site with download managers they show resume as not possible.
The code that does the download is
Are there any additional headers that need to be sent to the server to allow a download to be resumed or is a different technique required to allow downloads to be resumed?
Thanks
Ian
The location of downloadable files on our website is hidden from the users. When they click a button to download a file a PHP script finds the file and starts the download. Our users would like to use download managers in order to resume a interrupted download. However when testing our site with download managers they show resume as not possible.
The code that does the download is
Code: Select all
// set headers
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Type: $mtype");
header("Content-Disposition: attachment; filename=\"$asfname\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . $fsize);
// download
@readfile($file_path);
Thanks
Ian