http headers - Make MP3 seekable in php -


i using below code mp3 file via php. problem mp3 code produces not seeking.

@$filename = $_get['q'].'.mp3';  if(file_exists($filename)){ header("content-type: audio/mpeg"); header('content-length: ' . filesize($filename)); header('content-disposition: filename="' . $filename); header('x-pad: avoid browser bug'); header('cache-control: no-cache'); header('accept-ranges: bytes'); readfile($filename);  }else{ header("http/1.0 404 not found"); } 

it becomes headache find proper header or solution make possible seek mp3.

thanks in advance.

try this:

header('content-disposition:inline; filename="' . $filename . '"'); 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -