File: examples/play.php

Recommend this page to a friend!
  Classes of Subin Siby  >  Francium JavaScript Voice Recorder  >  examples/play.php  >  Download  
File: examples/play.php
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Francium JavaScript Voice Recorder
Record user voice and encode it as MP3 or WAV
Author: By
Last change: Version 0.4
Date: 6 months ago
Size: 406 bytes


Class file image Download
 * Get BLOB Data from Database and ouput
  require_once __DIR__ . "/db.php";
  $sql = $dbh->prepare("SELECT `audio`, LENGTH(`audio`) FROM `uploads` WHERE `id` = ?");
  $result = $sql->fetch();

  $audio = $result[0];
  $size = $result[1];
  header("Content-Length: $size");
  header("Content-Type: audio/wav");
  echo $audio;