I'm using this code to let my users download files :
header('Content-Type: application/octet-stream');
header("Content-Transfer-Encoding: Binary");
header("Content-disposition: attachment; filename=\"" . basename($file_url) . "\"");
readfile($file_url); // do the double-download-dance (dirty but worky)
header("refresh:0;url= $base_url");
The problem is, I have lots of different file types like zip , flv , pdf and so on .
my codes says that all those files are exe files .
How can I let browser download manager detect the file type?
Thanks