Location: PHPKode > projects > Top Music module > Top Music 3.0.7/html/modules/topMusic/fileinfo.php
<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <hide@address.com>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
/////////////////////////////////////////////////////////////////

echo '<HTML><HEAD>';
echo '<TITLE>getID3() - File Info</TITLE>';
echo '<STYLE>BODY,TD,TH { font-family: sans-serif; font-size: 9pt; }</STYLE>';
echo '</HEAD><BODY>';


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

// Initialize getID3 engine
$getID3 = new getID3();

$file="tracks/".$_GET['filename'];

echo '<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3">';

	$ThisFileInfo = $getID3->analyze($file);
	getid3_lib::CopyTagsToComments($ThisFileInfo);

	// output desired information in whatever format you want
	echo '<TR>';
	echo '<TH>Filename:</TH><TD>'.$ThisFileInfo['filenamepath'].'</TD>';
	echo '</TR>';
	echo '<TR>';
	echo '<TH>Artist:</TH><TD>'.(!empty($ThisFileInfo['comments_html']['artist']) ? implode('<BR>', $ThisFileInfo['comments_html']['artist']) : '&nbsp;').'</TD>';
	echo '</TR>';
	echo '<TR>';
	echo '<TH>Title:</TH><TD>'.(!empty($ThisFileInfo['comments_html']['title'])  ? implode('<BR>', $ThisFileInfo['comments_html']['title'])  : '&nbsp;').'</TD>';
	echo '</TR>';
	echo '<TR>';
	echo '<TH>Bitrate:</TH><TD ALIGN="RIGHT">'.(!empty($ThisFileInfo['audio']['bitrate'])        ? round($ThisFileInfo['audio']['bitrate'] / 1000).' kbps'   : '&nbsp;').'</TD>';
	echo '</TR>';
	echo '<TR>';
	echo '<TH>Playtime:</TH><TD ALIGN="RIGHT">'.(!empty($ThisFileInfo['playtime_string'])         ? $ThisFileInfo['playtime_string']                          : '&nbsp;').'</TD>';
	echo '</TR>';
	echo '</TABLE>';
?>
</BODY>
</HTML>
Return current item: Top Music module