Code Search for Developers
 
 
  

demo.basic.php from ECP (EliteCore Project) at Krugle


Show demo.basic.php syntax highlighted

<?php
// +----------------------------------------------------------------------+
// | PHP version 5                                                        |
// +----------------------------------------------------------------------+
// | Copyright (c) 2002-2004 James Heinrich                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2 of the GPL license,         |
// | that is bundled with this package in the file license.txt and is     |
// | available through the world-wide-web at the following url:           |
// | http://www.gnu.org/copyleft/gpl.html                                 |
// +----------------------------------------------------------------------+
// | getID3() - http://getid3.sourceforge.net or http://www.getid3.org    |
// +----------------------------------------------------------------------+
// | Authors: James Heinrich <infoØgetid3*org>                            |
// |          Allan Hansen <ahØartemis*dk>                                |
// +----------------------------------------------------------------------+
// | demo.basic.php                                                       |
// | getID3() demo file - showing the most basic use of getID3().         |
// | dependencies: getid3                                                 |
// +----------------------------------------------------------------------+
//
// $Id: demo.basic.php,v 1.1.1.1 2004/08/23 00:01:26 ah Exp $


// Enter your filename here 
$filename = '/data/getid3/aiff_wave.aiff';

// Include getID3() library (can be in a different directory if full path is specified)
require_once('../getid3/getid3.php');

// Initialize getID3 engine
$getid3 = new getID3;

// Tell getID3() to use UTF-8 encoding - must send proper header as well.
$getid3->encoding = 'UTF-8';

// Tell browser telling it use UTF-8 encoding as well.
header('Content-Type: text/html; charset=UTF-8');

// Analyze file 
try {

    $getid3->Analyze($filename);

    // Show audio bitrate and length
    echo 'Bitrate:  ' . @$getid3->info['audio']['bitrate'] . '<br>'; 
    echo 'Playtime: ' . @$getid3->info['playtime_string']  . '<br>';

}
catch (Exception $e) {
    
    echo 'An error occured: ' .  $e->message;
}

?>



See more files for this project here

ECP (EliteCore Project)

EliteCore Project is a PHP5.1/Javascript/AJAX/XHTML/CSS framework for creating WEB 2.0 applications and services.The basic open-source instalation can be also used as an interactive personal page or BLOG.This project uses the latest features available.

Project homepage: http://sourceforge.net/projects/elitecore
Programming language(s): JavaScript,PHP,XML
License: cpl

  demo.audioinfo.class.php
  demo.basic.php
  demo.browse.dhtml.php
  demo.browse.php
  demo.cache.dbm.php
  demo.cache.mysql.php
  demo.mime_only.php
  demo.mysql.php
  demo.mysql.sample_data.sql
  demo.mysql.structure.sql
  getid3.css
  index.php