Here's the code:
Code: Select all
<?php
$DLFile = 'http://www.abcdefg.com/file/whatever.exe';
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment; filename=".basename($DLFile).";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($DLFile));
readfile("$DLFile");
exit();
?>Basically, I want it to open the dialog box with the choice to save or open, and not add .php to the filename under Netscape. Anyone else have this problem, and know how to solve it?