Appropriate headers for Forcing download on IE/Mac and open with stuffit?

From: Date: Mon, 18 Mar 2002 10:03:03 +0000
Subject: Appropriate headers for Forcing download on IE/Mac and open with stuffit?
Groups: php.general 
Request: Send a blank email to php-general+get-88903@lists.php.net to get a copy of this message
Hi, I know it has been discussed before but I havent seen any working solutions. My problem is that I need to force a dowload for Mac users / IE and preferably also automatically let them open the file with stuffit expander. (it works with files downloaded from a webpage/apache without PHP) So there must be a way to replicate this behaviour in PHP, right? I've tried endless combinations of orders for the headers and removing parts of them. What I've ended up using is the following: header("Content-type: application/octet-stream\n"); header("Content-disposition: attachment; filename=\"$filename\"\n"); header("Content-transfer-encoding: binary\n"); header("Content-length: " . $filesize . "\n"); But it doesnt result in the desired behaviour though. Any Ideas? Cheers Jimmy And yes I've RTFM more than twice! Btw, I use PHP 4.12 as an Apache module on FreeBSD.

« previous php.general (#88903) next »