http://phpspot.org/blog/archives/2008/02/phpdlphp.html
header('Content-Type: application/octet-stream');
header('Content-Disposition: filename=dl.zip');
header('Content-Length: '.filesize('dl.zip'));
echo file_get_contents("dl.zip");
?>
This will also post the size of the file so you know how long it will take for it to download.
No comments:
Post a Comment
If you found this page useful, or you have any feedback, please leave a comment.