Hello, folks.
I am having a little trouble with this script. I want it to be able to read a directory, not just a file, and list all files in the directory along with their id3 tags. I can't get it to read all the files, it reads only the first file in the directory.
Here, I'm posting the basic (stripped down) script, without mods or add-ons.
I would appreciate any help.
Thanks.
<?php
require('error.inc.php');
require('id3.class.php');
$nome_arq = 'music.mp3';
$myId3 = new ID3($nome_arq);
if ($myId3->getInfo()){
echo('<HTML>');
echo('<a href= "'.$nome_arq.'">Click to play: </a><br>');
echo('<table border=1>
<tr>
<td><strong>Artist</strong></td>
<td><strong>Title</strong></font></div></td>
<td><strong>Track</strong></font></div></td>
<td><strong>Album/Year</strong></font></div></td>
<td><strong>Genre</strong></font></div></td>
<td><strong>Comments</strong></font></div></td>
</tr>
<tr>
<td>'. $myId3->getArtist() . ' </td>
<td>'. $myId3->getTitle() . ' </td>
<td>'. $myId3->getTrack() . ' </td>
<td>'. $myId3->getAlbum() . '/'.$myId3->getYear().' </td>
<td>'. $myId3->getGender() . ' </td>
<td>'. $myId3->tags['COMM']. ' </td>
</tr>
</table>');
echo('</HTML>');
}else{
echo($errors[$myId3->last_error_num]);
}
?>