ulty, [code]<?php
require_once 'MP3/Id.php';
// создаем объект, читаем данные
$id3 = &new MP3_Id();
$result = $id3->read('../data/Little-Big-Man.mp3');
// Ошибка "Tag not found" игнорируется
if (PEAR::isError($result) && $result->getCode() !== PEAR_MP3_ID_TNF) {
die($result->getMessage() . "n"
![*](/content/reactions/bystrie/podmig-original.png)
;
}
// Определяем информацию
$id3->setTag('name', 'Neuer Titel');
$id3->setTag('artists', 'Andere Band');
$id3->setTag('album', 'Schlagertraum #3');
$id3->setTag('year', 1984);
$id3->setTag('comment', 'Volksmusikal. Hochgenuss');
$id3->setTag('genre', 'Folk');
$id3->setTag('track', 5);
// Записываем информацию в тег
$result = $id3->write();
if (PEAR::isError($result)) {
die($result->getMessage() . "n"
![*](/content/reactions/bystrie/podmig-original.png)
;
}
echo "Тег успешно записан.! n";
?>[/code]