Answer the question
In order to leave comments, you need to log in
How to parse Mp3 through an intermediate server?
$file = "http:/$g1.vk.me/$g2/$g3/$g4.mp3"; // URL mp3 файла
$len = get_headers($file,1);
if ($len[0] == 'HTTP/1.1 200 OK') {
if (ob_get_level()) {
ob_end_clean();
}
header('Content-Description: File Transfer');
header('Content-Type: audio/mpeg');
header('Content-Disposition: attachment; filename='.$g5.'');
header("Content-Transfer-Encoding: chunked");
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . $len['Content-Length']);
readfile($file);
exit;
}
Answer the question
In order to leave comments, you need to log in
I think the point is that in one case it is a stream and it is impossible to rewind it back and forth without any buffering, in the other case it is a static file that can be read from anywhere. in flash players, if my memory serves me, when rewinding, a request is sent to the server and it prepares the stream from the right place. but in the case of a flash, I can be wrong.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question