jeudi 18 août 2016

corrupted mp3 file download in 3rd party song url

how to full mp3 file download . this following code corrupted file download like 15kb. how to resolve this issue and i used in hostgator server.

 $file = http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/iwillwatchanythingonce/DevinField_RikiOhmixdown.mp3;
if (isset($file)) {
    header("Content-Transfer-Encoding: binary"); 
    header("Content-Type: audio/mpeg, audio/x-mpeg, audio/x-mpeg-3, audio/mpeg3");       
    header('Content-Disposition: attachment;filename='.basename($file));
    header('Content-Transfer-Encoding: binary');
    header('Expires: 0');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
    header('Pragma: public');   
    ob_clean(); 
    readfile($file);
    exit;
} 

thank you

Aucun commentaire:

Enregistrer un commentaire