Jump to content

Problem to read ID3 tags from MP3...


LegendBreath

Recommended Posts

Hey,
I got some problems to read the ID3 tags from my MP3's tags, strangly, for some mp3 it works and for some it doesn't. Here is a screenshot (Path, Artist, Album, Title).

[a href=\"http://xs.to/xs.php?h=xs100&d=06202&f=Untitled-5.jpg\" target=\"_blank\"][img src=\"http://xs100.xs.to/xs100/06202/Untitled-5.jpg.xs.jpg\" border=\"0\" alt=\"IPB Image\" /][/a]

The thing is that I want to remove those squares, before there was "ÿþ" symbols but I removed them.
Here is my code:
[code]            $path = $_GET["path"];
            $i = 0;
            
            require('id3.class.php');
            $myId3 = new ID3($mp3);
            
            $files = filelist($path, 1, 0);
            foreach ($files as $list) {
                if (ereg (".mp3", $list['name'])) {
                   $mp3 = $list['path'].$list['name'];
                   $myId3->ID3($mp3);
                  
                   if ($myId3->getInfo()){
                           $artist = str_replace("ÿþ", "", $myId3->getArtist());
                        $album = str_replace("ÿþ", "", $myId3->getAlbum());
                        $title = str_replace("ÿþ", "", $myId3->getTitle());
                        echo $list['path'].$list['name']." ".$artist." ".$album." ".$title.'<br>';
                   }else{
                        echo '<font color="red">'.$list['path'].$list['name'].'</font><br>';    
                   }
                  
                   $mp3array[$i] = $list['path'].$list['name'];
                   $i++;
                }
            }[/code]

Can someone help me?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.