An id3 tag reader.
- PHP 7.4+
requires composer
(note: replace dev-main
with a version boundary)
{
"require": {
"php": "^7.4",
"chillerlan/php-id3tag": "dev-main"
}
}
Profit!
use chillerlan\ID3Tag\ID3;
$id3 = new ID3;
// ID3::read() returns an ID3Data object
$data = $id3->read('/path/to/my.mp3');
if($data->id3v2 !== null){
foreach($data->id3v2 as $tagdata){
// ...
var_dump($tagdata);
}
}