I have problem to download a MIDI-file (.mid) to a mobile phone.
I have a page called "download.php":
<?php
$filename = $_GET['file'];
$directory = "midi/";
$path = "$directory$filename";
if (file_exists($path) ) {
header("Content-type: audio/midi");
readfile("$path");
}
?>
It works to download the MIDI-file, but the file is saved to the phone as "download.mid", instead of its right name.
On a web browser, the MIDI-file opens and plays with the right name.
Is there any way to solve this?