I have a download script that inludes this page to get the url of the file to download. The file is .wma (Windows Media) format.
My problem with this is that when it brings up the popup download box, it says: You have chosen to download a file.
10.wma from http://www.mywebsite.com.
When I choose save, it downloads a "blank" file in like 2 sec. (It's a 4Mb file).
What seems to be the problem???
CODE:
<?
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=".basename($url).";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($url));
?>
($url is the whole web url of the file)