Here is my php code to stream mp3 file through php
set_time_limit(0);
$dirPath = \"path_of_the_directory\";
$songCode = $_REQUEST[\'c\'];
$filePath = $dirPat
array(
'method'=>'GET',
'header'=>"Accept-language: en\r\n"
)
)
);
header('Content-type: audio/mpeg');
header ("Content-Transfer-Encoding: binary");
header ("Pragma: no-cache");
header ("icy-br: " . $bitrate);
$fpOrigin=fopen($filePath, 'rb', false, $strContext);
while(!feof($fpOrigin)){
$buffer=fread($fpOrigin, 4096);
echo $buffer;
flush();
}
fclose($fpOrigin);
I know this post was from last year but someone might find this useful. This will stream the content.