This method of forcing a download
header("Content-type: application/octet-stream; name=\"$fn\"");
header("Content-Disposition: attachment; filename=\"$fn\"");
header("Content-Transfer-Encoding: binary");
passthru("cat \"$fn\"");
Works fine for Netscape 4.x (any platform)
and IE 5.0 on the PC.
It doesn't work for IE5.5 on the PC. It
always downloads the html source that originated the download. I tried a slight
adjustment that someone mentioned using:
header("Content-Disposition: filename=\"$fn\"");
but this has unpredictable results depending on whether IE knows what to do with the file. It seems that the suffix of "$fn" overrides any mime type passed in the Content-Type header.
I can get nothing to work reliably under Explorer on the MAC.
Anyone out there have any ideas or coroborating experience?
Neil