hi, i've been struggling with this for some time, and finally came up with a hack that seems to work. IE5.5 is acting up - it doesn't like
Content-Disposition: attachment; filename=blah.txt
it seems to like:
Content-Disposition: filename=blah.txt
I believe the first is the correct format. Anyway, I couldn't come up with a combination of headers to force a download for NS & IE, so i used my browscap file, and get_browser() - I guess I coulda used javascript to pass a param to tell me what browser it is...anyway, here's what i got:
force download:
header("Content-Type: application/ms-x-download");
header("Content-Length: $message->bytes");
use browsecap to get info about this browser - IE 5.x is acting up
$browser = get_browser();
if(preg_match("/IE 5./", $browser->parent)){
stupid IE hack:
header("Content-Disposition: filename=$fileName");
}else{
correct format:
header("Content-Disposition: attachment; filename=$fileName");
}
header("Content-Transfer-Encoding: binary");
hope this helps someone out there - please gimme feedback if it does, or if you see a problem or better way to do this.
thanks!
blake