Try to send some headers before audio/video content, so the browser vill know that the file should be downloaded:
PHP Code:
if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT']))
{
// IE Bug in download name workaround
ini_set( 'zlib.output_compression','Off' );
}
header ("HTTP/1.1 200 OK");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0, false");
header("Cache-control: private");
header("Pragma: no-cache");
header ("Content-Type: application/octet-stream;\n");
header("Content-Disposition: attachment; filename=video.mp3\n");
header("Content-Length: ". filesize($FilePath));
Bookmarks