6
you're on the right track, but you maybe unaware that IE has a major bug that you can't get around easily..
you'll find the method above should work fine with firefox and other browsers..
I just spent over 14hrs constantly trying to solve this same issue in the upcoming wf-downloads release, and it wasn't easy to find a solution that worked on all browsers especially IE.
here's a snippet of the headers that i found worked fine after much experimentation na dhair pulling..
you should be able to adjust this to your hack or whatever you are trying to achieve.
if(ini_get('zlib.output_compression'))
ini_set('zlib.output_compression', 'Off'); // must do for IE
header("Pragma: public"); // you must make this public for IE
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); // also for IE
header("Cache-Control: private",false);
header("Content-Transfer-Encoding: binary");
header("Content-Type: " . $mimeType);
header("Content-Disposition: attachment; filename=" . $file_name);
$fp = fopen($filePath, "rb");
fpassthru($fp);
exit();
i've adjusted it somewhat for your needs and removed some of the wf-d code from it. but you should be able to make it work from that.
$mimeType needs to be 'x-zip compressed' for zip files
$filePath needs to be defined also, this should be the absolute path to the file, not the URL, so you can use XOOPS_ROOT_PATH as a start.
hope this helps..