I am trying to force a download of a document with header(). It went just allrigth in my home (test server - apache + php), but when I tested in miarroba nothing worked as I wanted. The gzcompress() funcition is not working, even saying in phpinfo() that miarroba supports it and the Content-Type: application/force-dowload and Content-Type: application/octet-stream didn´t worked.
Yo postei este tema en english porque yo no se hablar espanol muy bien. Alguna duvida con lo english yo posso ayudar
Here is the code I am using:
header( "Pragma: public" );
header( "Expires: 0" );
header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
header( "Content-Type: application/force-download" );
header( "Content-Type: application/octet-stream" );
header( "Content-Type: application/download" );
header( "Content-Disposition: attachment; filename=".basename($filename).";" );
header( "Content-Transfer-Encoding: binary" );
header( "Content-Length: ".filesize($filename) );
readfile( "$filename" );
exit();