idea ide updates
[scannr.git] / getfile.php
blob:a/getfile.php -> blob:b/getfile.php
--- a/getfile.php
+++ b/getfile.php
@@ -1,19 +1,19 @@
 <?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....");
+$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();
 ?>