Application header problem -> PHP
Posted by: RaelRiaK
Posted on: 2006-07-13 05:49:00
Hello every body!
I need help about the headers we have to use with dreamhost. In fact, i retrieve (with streams or cURL) the content of whole file, and i would like the web browser to let me download this content by using specific headers. These are the ones i use on my machin with a xampp apache server :
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=".basename($sourceFTP).";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($sourceFTP));
I have to say that personnaly i don't really understand it because i'm not very good at headers technology.
The only thing i know is that it perfectly works on my xampp, but not on dreamhost. The download is initialized, but it stays in the "starting" mode on firefox, and is cancelled by internet explorer after the "save as..." part.
Can someone tell me why please?
Thanks a lot
Renaud