Hello, i am using a script which is used to link a files if you have multiple servers, for example i have file located at abc.com/folder/1.mp3 now on my main server i use that script to link that 1.mp3 like this. mysite.com/download.php?id=001, now the issue is for mp3 files it start playing it instead of downloading, i am looking for solution so it may start downloading instead of playing it. The script coding is as follows. <?php $url[0] = "http://www.mysite.com"; $url["01"] = "abc.com/folder/1.mp3"; $url["02"] = "abc.com/folder/2.mp3"; $url["03"] = "abc.com/folder/3.mp3"; $url["04"] = "abc.com/folder/4.mp3"; $url["05"] = "abc.com/folder/5.mp3"; $id = $_GET['id']; if ($id <> '' && $url[$id] <> '') { header("Location: $url[$id]"); exit(); } else { header("Location: $url[0]"); exit(); } ?> PHP: I will appreciate your help. -Regards.
AddType application/octet-stream .mp3 Code (markup): Add it to your .htaccess file and see if anything changes.
will it work if the files are not on my server? i mean those mp3 files i just have download.php file.
Hi there Other option is zip them first so they will have zip or rar extension and you won't have problems