Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read/write id3 tags in php 7?

There is a list of functions for id3 http://php.net/manual/ref.id3.php. It requires pecl package http://pecl.php.net/package/id3. Both versions of that package is alpha, but that is not the main problem.

pear/id3 requires PHP (version >= 4.3.0, version <= 6.0.0), installed version is 7.2.10-0ubuntu0.18.04.1

How can I read and write ID3 tags in PHP 7?

like image 444
Hevyweb Avatar asked Oct 16 '25 22:10

Hevyweb


1 Answers

I faced with the same problem, after some searching I stopped on https://github.com/JamesHeinrich/getID3

<?php

require 'vendor/getID3/getid3/getid3.php';

// Initialize getID3 engine
$getID3 = new getID3;

// Analyze file and store returned data in $ThisFileInfo
$ThisFileInfo = $getID3->analyze('some mp3 file.mp3');

print_r($ThisFileInfo);
like image 83
Denis Alimov Avatar answered Oct 19 '25 14:10

Denis Alimov