select input
[scannr.git] / getfile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
$reqfile = "path/to/file.3gp";
$contenttype = "audio/3gpp";
 
if ($fn = fopen($reqfile, "rba")) {
    header("Content-Type: " . $contenttype);
    header("Content-Length: " . filesize($reqfile));
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Pragma: no-cache");
    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");
    passthru("ffmpeg -i 2012-09-29-1348911268.34-demo.wav -ar 8000 -ab 4.75k -");
    fpassthru($fn);
    fclose($fn);
} else {
    exit("error....");
}
exit();
?>