getRealFilePath(); if(!is_file($filepath)) { header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); //print 'Ressource in database, but not in storage. Sorry.'; exit; } // !! binary mode !! $fp = fopen($filepath, 'rb'); header("Content-Type: audio/mpeg"); header("Content-Length: " . filesize($filepath)); fpassthru($fp); } else { header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); exit; } } else { header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); exit; } exit; ?>