cvs: phpdoc /en/reference/id3/functions id3-get-tag.xml

From: Date: Thu, 16 Dec 2004 17:32:45 +0000
Subject: cvs: phpdoc /en/reference/id3/functions id3-get-tag.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969365490@lists.php.net to get a copy of this message
schst Thu Dec 16 12:32:45 2004 EDT Modified files: /phpdoc/en/reference/id3/functions id3-get-tag.xml Log: added example for ID3 v2 http://cvs.php.net/diff.php/phpdoc/en/reference/id3/functions/id3-get-tag.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc/en/reference/id3/functions/id3-get-tag.xml diff -u phpdoc/en/reference/id3/functions/id3-get-tag.xml:1.1 phpdoc/en/reference/id3/functions/id3-get-tag.xml:1.2 --- phpdoc/en/reference/id3/functions/id3-get-tag.xml:1.1 Mon Jun 28 16:25:40 2004 +++ phpdoc/en/reference/id3/functions/id3-get-tag.xml Thu Dec 16 12:32:44 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="function.id3-get-tag"> <refnamediv> <refname>id3_get_tag</refname> @@ -52,17 +52,51 @@ </screen> </example> </para> - <note> - <simpara> - Currently <function>id3_get_tag</function> only supports - version 1.0 and 1.1. - </simpara> - </note> <para> The key <literal>genre</literal> will contain an integer between 0 and 147. You may use <function>id3_get_genre_name</function> to convert it to a human readable string. </para> <para> + Since version 0.2 <function>id3_get_tag</function> also supports ID3 tags of version 2.2, 2.3 and 2.4. + To extract information from these tags, pass one of the constants ID3_V2_2, ID3_V2_3 or ID3_V2_4 as the + second parameter. + </para> + <para> + <example> + <title><function>id3_get_tag</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$tag = id3_get_tag( "path/to/example2.mp3", ID3_V2_3 ); +print_r($tag); +?> +]]> + </programlisting> + <para> + This will output something like: + </para> + <screen> +<![CDATA[ +Array +( + [copyright] => Dirty Mac + [originalArtist] => Dirty Mac + [composer] => Marcus Götze + [artist] => Dirty Mac + [title] => Little Big Man + [album] => Demo-Tape + [track] => 5/12 + [genre] => (17)Rock + [year] => 2001 +) +]]> + </screen> + </example> + </para> + <para> + ID3 v2.x tags can contain a lot more information about the MP3 file than ID3 v1.x tags. + </para> + <para> See also <function>id3_set_tag</function>, <function>id3_remove_tag</function> and <function>id3_get_version</function>. </para>

« previous php.doc (#969365490) next »