<?php |
<?php |
$reqfile = "path/to/file.3gp"; |
$reqfile = "path/to/file.3gp"; |
$contenttype="audio/3gpp"; |
$contenttype = "audio/3gpp"; |
|
|
if($fn=fopen($reqfile, "rba")){ |
if ($fn = fopen($reqfile, "rba")) { |
header("Content-Type: ".$contenttype); |
header("Content-Type: " . $contenttype); |
header("Content-Length: ".filesize($reqfile)); |
header("Content-Length: " . filesize($reqfile)); |
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
header("Pragma: no-cache"); |
header("Pragma: no-cache"); |
header("Expires: Mon, 26 Jul 1997 06:00:00 GMT"); |
header("Expires: Mon, 26 Jul 1997 06:00:00 GMT"); |
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0"); |
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0"); |
passthru("ffmpeg -i 2012-09-29-1348911268.34-demo.wav -ar 8000 -ab 4.75k -"); |
passthru("ffmpeg -i 2012-09-29-1348911268.34-demo.wav -ar 8000 -ab 4.75k -"); |
fpassthru($fn); |
fpassthru($fn); |
fclose($fn); |
fclose($fn); |
}else{ |
} else { |
exit("error...."); |
exit("error...."); |
} |
} |
exit(); |
exit(); |
?> |
?> |
|
|