You are right. You shouldn't post it here.

To point you in the right direction, you need to associate the file extention (.php) with the appropriate php MIME type in your webserver's configuration (httpd.conf) file.

BR,
Nikos

----- Original Message ----- From: "sangprabv" <[email protected]>
To: <[email protected]>
Sent: Saturday, October 17, 2009 3:02 AM
Subject: OOT Force Download


Sorry for this miss addressed question, I am developing a PHP script to
let users to download content (wallpaper, tones, etc) from mobile
phones. In same cases the browser download the script.php file rather
than the content itself. Here is my script:

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: '.$mime);
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Accept-Ranges: bytes");
header("Content-Disposition: attachment;
filename=".basename($file).";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($file));
readfile($file);

Thanks alot for any reply.



Willy



Reply via email to