| // | Allan Hansen | // +----------------------------------------------------------------------+ // | demo.mime_only.php | // | getID3() demo file - scan single file and return only the MIME type. | // +----------------------------------------------------------------------+ // // $Id: demo.mime_only.php,v 1.3 2006/11/16 22:11:58 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; // Do not parse file or tags $getid3->option_analyze = false; $getid3->option_tag_id3v1 = false; $getid3->option_tag_id3v2 = false; $getid3->option_tag_lyrics3 = false; $getid3->option_tag_apetag = false; // Analyze file try { $getid3->Analyze($filename); // Show audio bitrate and length echo 'Mime-type: ' . @$getid3->info['mime_type']; } catch (Exception $e) { echo 'An error occured: ' . $e->message; } ?>