Page 1 of 1

Writing ID3 Tag in MP3 File

Posted: Wed Jan 11, 2006 12:43 pm
by zimick7
I am looking for a way to change ID3 tag information for an MP3 file with PHP. I know there are several ways to read the tag info with PHP classes and scripts, but has anyone run into a way to write?

I would like to be able to change title, artist, etc. (including album art) with php.

base64?

Any thoughts? ideas? suggestions?

Posted: Wed Jan 11, 2006 12:46 pm
by Burrito
reinvent the wheel you should not.

do this exactly getID3 will

http://sourceforge.net/projects/getid3/

Posted: Wed Jan 11, 2006 12:49 pm
by zimick7
I had seen getID3 before, but I thought it only was able to extract (read) from an ID3 tag...

Thanks for the info... I will check it out more in depth.

Posted: Wed Jan 11, 2006 1:41 pm
by spamyboy
What is ID3 ?

Posted: Wed Jan 11, 2006 2:19 pm
by feyd
spamyboy wrote:What is ID3 ?
learn to use google you should. (sorry Burr, had to)

http://www.id3.org/history.html

Posted: Fri Mar 10, 2006 7:50 am
by mehdiS

Posted: Fri Mar 10, 2006 9:36 am
by hawleyjr
zimick7 wrote:I had seen getID3 before, but I thought it only was able to extract (read) from an ID3 tag...

Thanks for the info... I will check it out more in depth.
You may want to read the readme.txt file that goes with ID3 tag :roll: :roll: :roll:

Code: Select all

// Writing tags:
require_once('getid3.php');
$getID3 = new getID3;
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'write.php', __FILE__);
$tagwriter = new getid3_writetags;
$tagwriter->filename   = $Filename;
$tagwriter->tagformats = array('id3v2.3', 'ape');
$TagData['title'][]  = 'Song Title';
$TagData['artist'][] = 'Artist Name';
$tagwriter->tag_data = array(;
if ($tagwriter->WriteTags()) {
	echo 'success';
} else {
	echo 'failure';
}