Skip to content

chillerlan/php-id3tag

Repository files navigation

php-id3tag

An id3 tag reader.

PHP Version Support version license Coverage Scrunitizer Packagist downloads
Continuous Integration

Documentation

Requirements

  • PHP 7.4+

Installation

requires composer

composer.json

(note: replace dev-main with a version boundary)

{
	"require": {
		"php": "^7.4",
		"chillerlan/php-id3tag": "dev-main"
	}
}

Profit!

Usage

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);
	}
}