firefox wouldnt stream mp3 files completely from my php page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
daregazi
Forum Newbie
Posts: 15
Joined: Mon Dec 08, 2008 1:49 pm

firefox wouldnt stream mp3 files completely from my php page

Post by daregazi »

hi everyone,
I have a php file trying to read and stream mp3 files. It works fine in IE but my problem is Firefox streams only 3 seconds of them.

$direction = $row['URL'];

$path='http://'.$direction;
ob_start();

header('Content-type: audio/mpeg');
header('Content-Length: '.filesize($path)); // provide file size

header("Content-Transfer-Encoding: binary");
header('X-Pad: avoid browser bug');
header("Expires: -1");

header("Cache-Control: no-store, no-cache, must-revalidate");

header("Cache-Control: post-check=0, pre-check=0", false);


readfile($path);
ob_end_flush();


Any workaround please????
daregazi
Forum Newbie
Posts: 15
Joined: Mon Dec 08, 2008 1:49 pm

Re: firefox wouldnt stream mp3 files completely from my php page

Post by daregazi »

I think the problem relies on the QuickTime Plug-in 7.4.1 for FF. when I disabled it, the code completely streamed the file into the client (i.e. Real player)
Post Reply