I have a great download script I have been using from: http://www.zubrag.com/scripts/download.php. It uses the following 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);
My goal is to call this php download file, which will display some initial html information then begin the download... similar to 'your download should start momentarily, otherwise click the following link'. The problem is that when I place the html code before the download code in this file, the contents of the file are displayed by the browser in binary (rather than starting the file download).
Is it possible to do this, or am I way off base? Any suggestions will be greatly appreciated.