I followed some of the examples that was on PHP header()
http://us3.php.net/manual/en/function.header.php

I am trying to have users download a file named 'Setup.msi', however
under a PHP file with the sent header information, the default name to
the user will be 'ApplicationSetup_v1_0.msi' -- I am sending the
recommended header information in the notes. For example in my
'download.php':

$forcename = "ApplicationSetup_v1_0.msi";
$filename = "Setup.msi";

header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream; name=".$forcename);
header("Content-Type: application/octetstream; name=".$forcename);
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filename));

@readfile($filename);


When I LEFT-CLICK the 'download.php' link in Internet Explorer 6/7 and
Firefox 2/3, it defaults the download name to the variable that I want
it changed to ($forcename). When I RIGHT-CLICK in Internet Explorer
6/7, it also works. However when I RIGHT-CLICK the link in Firefox
2/3, it downloads the file as 'download.php' and not the specified
name and .msi extension (I can still rename to the .msi extension and
it works fine). Am I missing another header or is there known issue
for Firefox right-click "Save Link As..." and default the name to
something else? Or should I contact Firefox on this to get more
information to default the name to something different?

Thanks


-- 
William Frankhouser
WilzDezign
http://www.wilzdezign.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to