note 25969 deleted from function.header by sniper

From: Date: Sun, 07 Sep 2003 21:34:26 +0000
Subject: note 25969 deleted from function.header by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55620@lists.php.net to get a copy of this message
Note Submitter: webmaster AT f1-timer DOT de ---- Regarding the Filename problems with NS7 / Mozilla when passing the filename via header("Content-Disposition:"). I have finally manged it to fix that problem with the *.php extension by sending a content-type of: application/x-zip-compressed and Mozilla does now recognize the .zip extension for my files. Here is a short example: if(stristr($HTTP_SERVER_VARS["HTTP_USER_AGENT"],"Gecko")) header("Content-type: application/x-zip-compressed\n"); else header("Content-type: application/zip"); header("Content-transfer-encoding: binary\n"); $head="Content-Disposition: attachment; filename=".$myname."\n"; header($head); header("Content-Length: ".$mylength); Hope that helps someone, it took quite some time to figure out this problem...

« previous php.notes (#55620) next »