What i would like to do is load an mp3 in flash. But the mp3 isn't in the www-root for security reasons (direct linking). So I have a flash movie which loads a php file loadSound(track, 1); where track is the name of the php file.

<php - file $url is the file url>
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

// create the necessary MP3 headers, this will type the page as MP3 and force download
$len = filesize($url);
header("Content-type: audio/mpeg;\r\n");
header("Content-Length: $len;\r\n");
$head = "Content-Disposition: attachment; filename=\"$file\";\r\n";
header($head);
readfile($url);
exit();
</php -file>

I just can't get it to work. If i call the script it opens up a downloadscreen with the right track to download but somehow flash doesn't want to load the file into the player. Any help?