Hi guys,

I have a script called "play.php" that i use to stream mp3 files to our Flash Media Player. It's basically to hide our file location.

So in the embed tag it will be
flashvars="file=play.php?id=2" rather than 
However i have problem with my play.php. Basically when it's still streaming the file somehow the script freezes, i can't click any other links within the page (say i dont like the song and i wanna go to a different page), even clicking the BACK button on the browser is not working. It just waits until the streaming finished then it will go to the next/previous page as soon as the streaming finished (i hope this makes sense)

I have tried to access the file directly, flashvar="file=mysongfile.mp3", and there's no problem at all, I can click any link in the middle of streaming/downloading the file and it will jump to the next page straight away. Only if i use the play.php file somehow it blocks the page.

Here's the play.php file:

$file_name = getFileName($_GET["id"]);

header('Content-Type: audio/mpeg');
header("Content-Transfer-Encoding: binary");
header('Content-Length: '.filesize($filepath));

$filepath ='/pathto/'.$file_name;

if ($stream = fopen($filepath, 'rb')){
   while(!feof($stream) && connection_status() == 0){
         //reset time limit for big files
I have tried using fpassthru as well, but same problem.

Any help would be appreciated.