firefox wouldnt stream mp3 files completely from my php page

Posted on 16th Feb 2014 by admin

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????

Other forums