You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

better header for file send function

Started by jonass, May 30, 2006, 15:35:44 PM

Previous topic - Next topic



This header works better for us as we had problem with product_sheet files in IE
Its a modified version of the send_file function in file ps_product_files.php
This header is based on the one used in Docman

$fsize = filesize($dbf->f("file_name"));
header("Pragma: public");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Expires: 0");
header("Content-Transfer-Encoding: binary");
header('Content-Disposition: inline;'
. ' filename="' . basename($dbf->f("file_name")) . '";'
. ' size=' . $fsize .';'
header("Content-Type: "    . $dbf->f("file_mimetype") );         
header("Content-Length: "  . $fsize);



Currently we have large downloads in our store (150mb FLV's) and it seems the PHP security is set to max 25mb for open scripts. Our downloads terminate around 18 to 20mb as a result. But using Docman they are fine. I am told this is due to one method (native VM downloads) uses PHP and the other (Docman) uses a different method.

Is this header hack a possible solution to this?



i have the same nasty problem man :s don't know a solution :(