PHP code example of rhorber / id3rw

1. Go to this page and download the library: Download rhorber/id3rw library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rhorber / id3rw example snippets


// Read frames from file.
$reader = new \Rhorber\ID3rw\Reader('/home/user/myfile.mp3');
$frames = $reader->getFrames();
print_r($frames);

// Change title.
$frames['TIT2']['information'] = '2018-10-21_'.$frames['TIT2']['information'];

// Write a new file (with modified title).
$writer = new \Rhorber\ID3rw\Writer();
$writer->writeNewFile($frames, '/home/user/mynewfile.mp3', '/home/user/myfile.mp3');