Get album art from MP3 PHP
I am using this code to get ID3 information of an MP3 File.
        
        <?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->title=fread($fp,30); 
            $this->artist=fread($fp,30); 
            $this->album=fread($fp,30); 
            $this->year=fread($fp,4); 
            $this->comment=fread($fp,30); 
            $this->genre=fread($fp,1); 
            fclose($fp); 
            return true; 
           } else { 
            fclose($fp); 
            return false; 
           } 
          } else { return false; } 
         } 
        } 
        ?>

I am then using this code to call it.

         include ("CMP3File.php"); 
         $filename="music_file.mp3"; 
         $mp3file=new CMP3File; 
         $mp3file->getid3($filename); 
         echo "Title: $mp3file->title<br>\n"; 
         echo "Artist: $mp3file->artist<br>\n"; 
         echo "Album: $mp3file->album<br>\n"; 
         echo "Year: $mp3file->year<br>\n"; 
         echo "Comment: $mp3file->comment<br>\n"; 
         echo "Genre: " . Ord($mp3file->genre) . "<br>\n";  

Is there a way to also get and echo out the album art as an image?
Get album art from MP3 PHP
===

I am using this code to get ID3 information of an MP3 File.
        
        <?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->title=fread($fp,30); 
            $this->artist=fread($fp,30); 
            $this->album=fread($fp,30); 
            $this->year=fread($fp,4); 
            $this->comment=fread($fp,30); 
            $this->genre=fread($fp,1); 
            fclose($fp); 
            return true; 
           } else { 
            fclose($fp); 
            return false; 
           } 
          } else { return false; } 
         } 
        } 
        ?>

I am then using this code to call it.

         include ("CMP3File.php"); 
         $filename="music_file.mp3"; 
         $mp3file=new CMP3File; 
         $mp3file->getid3($filename); 
         echo "Title: $mp3file->title<br>\n"; 
         echo "Artist: $mp3file->artist<br>\n"; 
         echo "Album: $mp3file->album<br>\n"; 
         echo "Year: $mp3file->year<br>\n"; 
         echo "Comment: $mp3file->comment<br>\n"; 
         echo "Genre: " . Ord($mp3file->genre) . "<br>\n";  

Is there a way to also get and echo out the album art as an image?