Again, I realize this question is kind of old and I have read through almost every message on this server relating in ANY way to this subject. I also realize that Microsoft has changed the way their 5.5 browser interprets headers and MIME types. Ok my question is still: How can I force a download in IE5.5. Yes I know all about using a different MIME type that the browser doens't know and/or using octet-stream or putting CONTENT-ATTACHMENT but none of these work in IE5.5. If you read some of my earlier posts there were quite a few good responses to my query and most all of them worked in all browsers BUT IE5.5 and that is the specific one I need to get it to work. As a quick snippet, here is the code I have on the site now and in 5.5 it downloads the PHP page and not the actual file like I want it too.
$fp=fopen("http://www.MYURL.ws/DIR/$filename" , "r");
$fsize = filesize("http://www.MYURL.ws/DIR/$filename");
$mimetype="mime-special";
header("Content-type: $mimetype");
header("Content-Disposition: attachment; filename=$filename");
header("Content-Description: PHP3 Generated Data");
header("Pragma: no-cache");
header("Expires: 0");
fpassthru($fp);
Ok so why re-post this eternal question. Answer is simple enough; there is ALWAYS a way. I am certain that Microwoft has not blocked ALL avenues to reach my goal. For those of you who are tempted to suggest an alternative method (god forbid the right click-save as instructions) here is why I am being so adamant about this is because I know their is a way and really don't want it to work differently.
I run a Sound Repository. Media Player, when you click File - Save from the menus's puts a [1] on the end of the filename so bill.wav becomes bill[1].wav and I don't know why. Now the problem lies in that this is for Yahoo! Chat and when people play their sound file <snd=bill[1]> other people don't hear it because they have the bill.wav ... so that is my dilema and yet instructios for people to right-click are tedious/not followed and generally not a good idea. A working example of my query is at this URL (forewarning: it doesn't work in IE5.5)
www.iquest.ws/?sndr.1
scroll down and click on And of the little Disk Drive icons then click on "Download".
Again thank you in advance and if i still can't figure it out, expect another post in another month or two.
Jace