mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
added example for ID3 v2
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@174905 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
3298c65fd1
commit
9aa60872e6
1 changed files with 41 additions and 7 deletions
|
@ -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,16 +52,50 @@ Array
|
|||
</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>.
|
||||
|
|
Loading…
Reference in a new issue