I would like to know how can I send a mpeg file content to a client browser.
I have this code:
<?php
header("Content-Type: audio/mpeg");
header("Content-Length: ".filesize("13662f12.mp3"));
header("Cache-Control: no-cache");
readfile("13662f12.mp3");
On local it works fine. but on server the file stops reading after 10 seconds. I downloaded the song with ctrl+s and play it with a player without any problem.
I have this error: net::ERR_CONTENT_LENGTH_MISMATCH on Chrome.
I tried on Firefox too but nothing.
I would like to know why too!