<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <title>Rock out!</title>

    <style type="text/css">
        body { background-color: #fff; padding: 0 20px; color:#000; font: 13px/18px Arial, sans-serif; }
        a { color: #360; }
        h3 { padding-top: 20px; }
        ol { margin:5px 0 15px 16px; padding:0; list-style-type:square; }
        .code { margin: 5px; padding: 5px; border: 1px dashed #444444; background-color: #aaaaaa; font-family: monospace; }
    </style>

</head>
<body>

<?php

require_once('getid3/getid3.php');
$getID3 = new getID3;
$ThisFileInfo = $getID3->analyze("mp3/".$_GET['mp3']);


$tags = $ThisFileInfo['tags']['id3v2'];

if (!$tags['artist'][0]) {
    $tags = $ThisFileInfo['tags']['id3v1'];    
}

print "<h2>".$tags['title'][0]." by ".$tags['artist'][0]."</h2>";

?>
<br />


<div id="container"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
    var s1 = new SWFObject("player.swf","ply","328","200","9","#FFFFFF");
    s1.addParam("allowfullscreen","true");
    s1.addParam("allowscriptaccess","always");
    s1.addParam("flashvars","file=mp3/<?php print $_GET['mp3']; ?>&image=preview.jpg");
    s1.write("container");
</script>
</body>
</html>