Not necessarily an answer but on my work (a computer center for medical
students) we use a propietary Perl web-based course software and when doing
attachments on email messages on the system's bulletin board, the system
sends a header with "appplication/octet-stream" and IE 5.5 "attaches" the
.html extension to some downloads (not all). It is a known IE 5.5 bug, the
only way we have done to try to circumvent it (doesn't work everytime) is to
use the "Save Link As" feature, and sometimes that does the trick. IE 5.5
"Pierre-Yves" <[EMAIL PROTECTED]> wrote in message
> I worked on a script like yours for a looooooooooong time now!
> I need to force the download of various type of file, doc, pdf, zip, even
> Your script works fine on Opera 5.02 and netscape 4.76 on my win NT 4.0
> not on IE 5.5 On this one, it offers me to download the script file but
> instead of being
> a php file it has now an html extension !!
> Anyhow, I do have a download by email attachment button also, because I
> up on trying
> to find a script to force download....
> ----- Original Message -----
> From: "David Minor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, August 22, 2001 4:10 PM
> Subject: [PHP] Re: force download in IE -- conclusion
> > I ran some tests of different header configurations of 6
> > combinations to find out what worked and what didn't. I didn't cover
> > the platforms available, just those that my user-base uses, so this
> > complete.
> > combinations tested was IE5.5, NN4, NN6 for Windows 98 and IE5.5, NN4.7
> > Mac 9.1. I tested all of these browsers using/not using 'attachment' in
> > Content-Disposition header. and also changed out the Content-Type
> > with 'application/octet-stream', 'application/download', and '*/*'.
> > Here's the summary and what I did to make things work as well as
> > My goal is to prompt the user with a save-as dialog for an mp3 file.
> > IE5.5 for Mac always uses the quicktime plugin to play the file no
> > what the disposition or type is. (also no matter what the file
> > is. Couldn't figure out how to trick it to download the file.)
> > IE5.5 for Win98 would attempt to download the file if
> > attachment; filename=....") attachment was there.
> > All 3 of the Win98 browsers would do prompt with as few clicks as
> > when content-type was "application/octet-stream". Therefore, I test in
> > script for the Mac users and give them "Content-type:
> > while I give other users "Content-Type: application/octet-stream". Of
> > course, this doesn't help the IE5.5 Mac users who still have to use
> > "Downlaod Link to Disk" routine to get a save-as prompt.
> > Anyone who sees different ways this could be done, please respond.
> > Here's my code:
> > if (eregi("mac",$HTTP_USER_AGENT))
> > $type = "application/download";
> > else
> > $type = "application/octet-stream";
> > // stream file to user
> > header("Content-Type: $type");
> > header("Content-Disposition: attachment; filename=$filename");
> > header("Content-Length: ".filesize($tmp_file));
> > header("Content-Transfer-Encoding: binary");
> > readfile($tmp_file);
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]