title: Get album art from MP3 PHP
body: <p>I am using this code to get ID3 information of an MP3 File.</p>
  
  <pre><code>    &lt;?php
      class CMP3File { 
       var $title;var $artist;var $album;var $year;var $comment;var $genre; 
       function getid3 ($file) { 
        if (file_exists($file)) { 
         $id_start=filesize($file)-128; 
         $fp=fopen($file,"r"); 
         fseek($fp,$id_start); 
         $tag=fread($fp,3); 
         if ($tag == "TAG") { 
          $this-&gt;title=fread($fp,30); 
          $this-&gt;artist=fread($fp,30); 
          $this-&gt;album=fread($fp,30); 
          $this-&gt;year=fread($fp,4); 
          $this-&gt;comment=fread($fp,30); 
          $this-&gt;genre=fread($fp,1); 
          fclose($fp); 
          return true; 
         } else { 
          fclose($fp); 
          return false; 
         } 
        } else { return false; } 
       } 
      } 
      ?&gt;
  </code></pre>
  
  <p>I am then using this code to call it.</p>
  
  <pre><code>     include ("CMP3File.php"); 
       $filename="music_file.mp3"; 
       $mp3file=new CMP3File; 
       $mp3file-&gt;getid3($filename); 
       echo "Title: $mp3file-&gt;title&lt;br&gt;\n"; 
       echo "Artist: $mp3file-&gt;artist&lt;br&gt;\n"; 
       echo "Album: $mp3file-&gt;album&lt;br&gt;\n"; 
       echo "Year: $mp3file-&gt;year&lt;br&gt;\n"; 
       echo "Comment: $mp3file-&gt;comment&lt;br&gt;\n"; 
       echo "Genre: " . Ord($mp3file-&gt;genre) . "&lt;br&gt;\n";  
  </code></pre>
  
  <p>Is there a way to also get and echo out the album art as an image?</p>