Setting headers to download in Mac IE

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bondu
Forum Newbie
Posts: 12
Joined: Thu May 23, 2002 3:56 pm
Location: Los Angeles

Setting headers to download in Mac IE

Post by bondu »

I am having trouble setting the headers() to always download in Mac IE. No other browsers are giving me problems. It's happening on all version of Mac IE on OS 9 and OS X

header("Content-type: application/octet-stream");
header("Content-Length: ".$filesize);
header("Content-Disposition: attachment; filename=".$filename);
header("Content-Transfer-Encoding: binary");

Mac IE will download the file just fine unless it is a .jpg or .gif
If it is a .jpg or .gif IE opens it in the browser. I have tired any number of comibnations of headers(), but nothing seems to be working.

taking about attachment gives the same problem.
header("Content-Disposition; filename=".$filename);


Anyone know how to get Mac IE to always download the file - no matter what the file type?

Searching for this problem turns up LOTS of people having this same exact problem. . . .
Stoyanski
Forum Newbie
Posts: 15
Joined: Sun Jun 02, 2002 9:33 am
Location: BG
Contact:

Post by Stoyanski »

This is for shure not an answer but IE and opera using application/octetstream instead of application/octet-stream

BTW check this

Code: Select all

header('Content-Disposition: inline; filename="' . $filename . '"');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
Post Reply