cvs: phpdoc /en/reference/id3/functions id3-get-genre-id.xml id3-get-genre-list.xml id3-get-genre-name.xml id3-get-tag.xml id3-get-version.xml
id3-remove-tag.xml id3-set-tag.xml id3_get_genre_id.xml id3_get_genre_list.xml id3_get_genre_name.xml id3_get_tag.xml id3_get_version.xml
id3_remove_tag.xml id3_set_tag.xml

From: Date: Mon, 28 Jun 2004 20:25:41 +0000
Subject: cvs: phpdoc /en/reference/id3/functions id3-get-genre-id.xml id3-get-genre-list.xml id3-get-genre-name.xml id3-get-tag.xml id3-get-version.xml
id3-remove-tag.xml id3-set-tag.xml id3_get_genre_id.xml id3_get_genre_list.xml id3_get_genre_name.xml id3_get_tag.xml id3_get_version.xml
id3_remove_tag.xml id3_set_tag.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969361579@lists.php.net to get a copy of this message
schst Mon Jun 28 16:25:41 2004 EDT Added files: /phpdoc/en/reference/id3/functions id3-get-genre-id.xml id3-get-genre-list.xml id3-get-genre-name.xml id3-get-tag.xml id3-get-version.xml id3-remove-tag.xml id3-set-tag.xml Removed files: /phpdoc/en/reference/id3/functions id3_get_genre_id.xml id3_get_genre_list.xml id3_get_genre_name.xml id3_get_tag.xml id3_get_version.xml id3_remove_tag.xml id3_set_tag.xml Log: renamed files as per didou's request (sorry about the wrong filenames)

http://cvs.php.net/co.php/phpdoc/en/reference/id3/functions/id3-get-genre-id.xml?r=1.1&p=1 Index: phpdoc/en/reference/id3/functions/id3-get-genre-id.xml +++ phpdoc/en/reference/id3/functions/id3-get-genre-id.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.id3-get-genre-id"> <refnamediv> <refname>id3_get_genre_id</refname> <refpurpose>Get the id for a genre.</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>id3_get_genre_name</methodname> <methodparam><type>string</type><parameter>genre</parameter></methodparam> </methodsynopsis> <para> <function>id3_get_genre_id</function> returns the if for a genre. If the specified genre is not available in the genre list, <function>id3_get_genre_id</function> will return &false; </para> <note> <simpara>Instead of a filename you may also pass a valid stream resource.</simpara> </note> <para> In an ID3 tag, the genre is stored using a integer ranging from 0 to 147. </para> <para> <example> <title><function>id3_get_genre_id</function> example</title> <programlisting role="php"> <![CDATA[ <?php $id = id3_get_genre_id("Alternative"); echo $id; ?> ]]> </programlisting> <para> This will output: </para> <screen> <![CDATA[ 20 ]]> </screen> </example> </para> <para> See also <function>id3_get_genre_list</function> and <function>id3_get_genre_name</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/id3/functions/id3-get-genre-list.xml?r=1.1&p=1 Index: phpdoc/en/reference/id3/functions/id3-get-genre-list.xml +++ phpdoc/en/reference/id3/functions/id3-get-genre-list.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.id3-get-genre-list"> <refnamediv> <refname>id3_get_genre_list</refname> <refpurpose>Get all possible genre values.</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>array</type><methodname>id3_get_genre_list</methodname> <methodparam><type>void</type><parameter/></methodparam> </methodsynopsis> <para> <function>id3_get_genre_list</function> returns an array containing all possible genres that may be stored in an ID3 tag. This list has been created by Eric Kemp and later extended by WinAmp. </para> <note> <simpara>Instead of a filename you may also pass a valid stream resource.</simpara> </note> <para> This function is useful to provide you users a list of genres from which they may choose one. When updating the ID3 tag you will always have to specify the genre as an integer ranging from 0 to 147. </para> <para> <example> <title><function>id3_get_genre_list</function> example</title> <programlisting role="php"> <![CDATA[ <?php $genres = id3_get_genre_list(); print_r($genres); ?> ]]> </programlisting> <para> This will output: </para> <screen> <![CDATA[ Array ( [0] => Blues [1] => Classic Rock [2] => Country [3] => Dance [4] => Disco [5] => Funk [6] => Grunge [7] => Hip-Hop [8] => Jazz [9] => Metal [10] => New Age [11] => Oldies [12] => Other [13] => Pop [14] => R&B [15] => Rap [16] => Reggae [17] => Rock [18] => Techno [19] => Industrial [20] => Alternative [21] => Ska [22] => Death Metal [23] => Pranks [24] => Soundtrack [25] => Euro-Techno [26] => Ambient [27] => Trip-Hop [28] => Vocal [29] => Jazz+Funk [30] => Fusion [31] => Trance [32] => Classical [33] => Instrumental [34] => Acid [35] => House [36] => Game [37] => Sound Clip [38] => Gospel [39] => Noise [40] => Alternative Rock [41] => Bass [42] => Soul [43] => Punk [44] => Space [45] => Meditative [46] => Instrumental Pop [47] => Instrumental Rock [48] => Ethnic [49] => Gothic [50] => Darkwave [51] => Techno-Industrial [52] => Electronic [53] => Pop-Folk [54] => Eurodance [55] => Dream [56] => Southern Rock [57] => Comedy [58] => Cult [59] => Gangsta [60] => Top 40 [61] => Christian Rap [62] => Pop/Funk [63] => Jungle [64] => Native US [65] => Cabaret [66] => New Wave [67] => Psychadelic [68] => Rave [69] => Showtunes [70] => Trailer [71] => Lo-Fi [72] => Tribal [73] => Acid Punk [74] => Acid Jazz [75] => Polka [76] => Retro [77] => Musical [78] => Rock & Roll [79] => Hard Rock [80] => Folk [81] => Folk-Rock [82] => National Folk [83] => Swing [84] => Fast Fusion [85] => Bebob [86] => Latin [87] => Revival [88] => Celtic [89] => Bluegrass [90] => Avantgarde [91] => Gothic Rock [92] => Progressive Rock [93] => Psychedelic Rock [94] => Symphonic Rock [95] => Slow Rock [96] => Big Band [97] => Chorus [98] => Easy Listening [99] => Acoustic [100] => Humour [101] => Speech [102] => Chanson [103] => Opera [104] => Chamber Music [105] => Sonata [106] => Symphony [107] => Booty Bass [108] => Primus [109] => Porn Groove [110] => Satire [111] => Slow Jam [112] => Club [113] => Tango [114] => Samba [115] => Folklore [116] => Ballad [117] => Power Ballad [118] => Rhytmic Soul [119] => Freestyle [120] => Duet [121] => Punk Rock [122] => Drum Solo [123] => Acapella [124] => Euro-House [125] => Dance Hall [126] => Goa [127] => Drum & Bass [128] => Club-House [129] => Hardcore [130] => Terror [131] => Indie [132] => BritPop [133] => Negerpunk [134] => Polsk Punk [135] => Beat [136] => Christian Gangsta [137] => Heavy Metal [138] => Black Metal [139] => Crossover [140] => Contemporary C [141] => Christian Rock [142] => Merengue [143] => Salsa [144] => Thrash Metal [145] => Anime [146] => JPop [147] => SynthPop ) ]]> </screen> </example> </para> <para> See also <function>id3_get_genre_name</function> and <function>id3_get_genre_id</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/id3/functions/id3-get-genre-name.xml?r=1.1&p=1 Index: phpdoc/en/reference/id3/functions/id3-get-genre-name.xml +++ phpdoc/en/reference/id3/functions/id3-get-genre-name.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.id3-get-genre-name"> <refnamediv> <refname>id3_get_genre_name</refname> <refpurpose>Get the name for a genre id.</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>id3_get_genre_name</methodname> <methodparam><type>int</type><parameter>genre_id</parameter></methodparam> </methodsynopsis> <para> <function>id3_get_genre_name</function> returns the name for a genre id. </para> <note> <simpara>Instead of a filename you may also pass a valid stream resource.</simpara> </note> <para> In an ID3 tag, the genre is stored using a integer ranging from 0 to 147. </para> <para> <example> <title><function>id3_get_genre_name</function> example</title> <programlisting role="php"> <![CDATA[ <?php $genre = id3_get_genre_name(20); echo $genre; ?> ]]> </programlisting> <para> This will output: </para> <screen> <![CDATA[ Alternative ]]> </screen> </example> </para> <para> See also <function>id3_get_genre_list</function> and <function>id3_get_genre_id</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/id3/functions/id3-get-tag.xml?r=1.1&p=1 Index: phpdoc/en/reference/id3/functions/id3-get-tag.xml +++ phpdoc/en/reference/id3/functions/id3-get-tag.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.id3-get-tag"> <refnamediv> <refname>id3_get_tag</refname> <refpurpose>Get all information stored in an ID3 tag</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>array</type><methodname>id3_get_tag</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>version</parameter></methodparam> </methodsynopsis> <para> <function>id3_get_tag</function> is used to get all information stored in the id3 tag of the specified file. </para> <note> <simpara>Instead of a filename you may also pass a valid stream resource.</simpara> </note> <para> The optional <parameter>version</parameter> parameter allows you to specify the version of the tag as MP3 files may contain both, version 1.x and version 2.x tags. </para> <para> <example> <title><function>id3_get_tag</function> example</title> <programlisting role="php"> <![CDATA[ <?php $tag = id3_get_tag( "path/to/example.mp3" ); print_r($tag); ?> ]]> </programlisting> <para> This will output something like: </para> <screen> <![CDATA[ Array ( [title] => DN-38416 [artist] => Re:\Legion [album] => Reflections [year] => 2004 [genre] => 19 ) ]]> </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> See also <function>id3_set_tag</function>, <function>id3_remove_tag</function> and <function>id3_get_version</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/id3/functions/id3-get-version.xml?r=1.1&p=1 Index: phpdoc/en/reference/id3/functions/id3-get-version.xml +++ phpdoc/en/reference/id3/functions/id3-get-version.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.id3-get-version"> <refnamediv> <refname>id3_get_version</refname> <refpurpose>Get version of an ID3 tag</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>id3_get_version</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> </methodsynopsis> <para> <function>id3_get_version</function> retrieves the version(s) of the ID3 tag(s) in the MP3 file. As a tag can contain ID3 v1.x and v2.x tags, the return value of this function should be bitwise compared with the predefined constants <constant>ID3_V1_0</constant>, <constant>ID3_V1_1</constant> and <constant>ID3_V2</constant>. </para> <note> <simpara>Instead of a filename you may also pass a valid stream resource.</simpara> </note> <para> <example> <title><function>id3_get_version</function> example</title> <programlisting role="php"> <![CDATA[ <?php $version = id3_get_version( "path/to/example.mp3" ); if ($version & ID3_V1_0) { echo "Contains a 1.x tag\n"; } if ($version & ID3_V1_1) { echo "Contains a 1.1 tag\n"; } if ($version & ID3_V2) { echo "Contains a 2.x tag\n"; } ?> ]]> </programlisting> <para> This will output something like: </para> <screen> <![CDATA[ Contains a 1.x tag Contains a 1.1 tag ]]> </screen> </example> </para> <para> If a file contains an ID3 v1.1 tag, it always contains a 1.0 tag, as version 1.1 is just an extension of 1.0. </para> <para> See also <function>id3_get_tag</function>, <function>id3_set_tag</function> and <function>id3_remove_tag</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/id3/functions/id3-remove-tag.xml?r=1.1&p=1 Index: phpdoc/en/reference/id3/functions/id3-remove-tag.xml +++ phpdoc/en/reference/id3/functions/id3-remove-tag.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.id3-remove-tag"> <refnamediv> <refname>id3_remove_tag</refname> <refpurpose>Remove an existing ID3 tag</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>id3_remove_tag</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>version</parameter></methodparam> </methodsynopsis> <para> <function>id3_remove_tag</function> is used to remove the information stored of an ID3 tag. If no tag has been present, it will return &false; and leave the file as it was. </para> <note> <simpara>Instead of a filename you may also pass a valid stream resource.</simpara> </note> <para> The optional <parameter>version</parameter> parameter allows you to specify the version of the tag as MP3 files may contain both, version 1.x and version 2.x tags. </para> <para> <example> <title><function>id3_remove_tag</function> example</title> <programlisting role="php"> <![CDATA[ <?php $result = id3_remove_tag( "path/to/example.mp3", ID3_V1_0 ); if ($result === true) { echo "Tag succesfully removed\n"; } ?> ]]> </programlisting> <para> If the file is writeable and contained a 1.0 tag, this will output: </para> <screen> <![CDATA[ Tag succesfully removed ]]> </screen> </example> </para> <note> <simpara> Currently <function>id3_remove_tag</function> only supports version 1.0 and 1.1. If you choose to remove a 1.0 tag and the file contains a 1.1 tag, this tag will be removed, as v1.1 is only an extension of 1.0. </simpara> </note> <para> See also <function>id3_get_tag</function>, <function>id3_set_tag</function> and <function>id3_get_version</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc/en/reference/id3/functions/id3-set-tag.xml?r=1.1&p=1 Index: phpdoc/en/reference/id3/functions/id3-set-tag.xml +++ phpdoc/en/reference/id3/functions/id3-set-tag.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.id3-set-tag"> <refnamediv> <refname>id3_set_tag</refname> <refpurpose>Update information stored in an ID3 tag</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>bool</type><methodname>id3_set_tag</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> <methodparam><type>array</type><parameter>tag</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>version</parameter></methodparam> </methodsynopsis> <para> <function>id3_set_tag</function> is used to change the information stored of an ID3 tag. If no tag has been present, it will be added to the file. </para> <note> <simpara>Instead of a filename you may also pass a valid stream resource.</simpara> </note> <para> The optional <parameter>version</parameter> parameter allows you to specify the version of the tag as MP3 files may contain both, version 1.x and version 2.x tags. </para> <para> <example> <title><function>id3_set_tag</function> example</title> <programlisting role="php"> <![CDATA[ <?php $data = array( "title" => "Re:Start", "artist" => "Re:\Legion", "comment" => "A nice track" ); $result = id3_set_tag( "path/to/example.mp3", $data, ID3_V1_0 ); if ($result === true) { echo "Tag succesfully updated\n"; } ?> ]]> </programlisting> <para> If the file is writeable, this will output: </para> <screen> <![CDATA[ Tag succesfully updated ]]> </screen> </example> </para> <note> <simpara> Currently <function>id3_set_tag</function> only supports version 1.0 and 1.1. </simpara> </note> <para> The following keys may be used in the associative array: </para> <para> <table> <title>Keys in the associative array</title> <tgroup cols="3"> <thead> <row> <entry>key</entry> <entry>possible value</entry> <entry>available in version</entry> </row> </thead> <tbody> <row> <entry>title</entry> <entry>string with maximum of 30 characters</entry> <entry>v1.0, v1.1</entry> </row> <row> <entry>artist</entry> <entry>string with maximum of 30 characters</entry> <entry>v1.0, v1.1</entry> </row> <row> <entry>album</entry> <entry>string with maximum of 30 characters</entry> <entry>v1.0, v1.1</entry> </row> <row> <entry>year</entry> <entry>4 digits</entry> <entry>v1.0, v1.1</entry> </row> <row> <entry>genre</entry> <entry>integer value between 0 and 147</entry> <entry>v1.0, v1.1</entry> </row> <row> <entry>comment</entry> <entry>string with maximum of 30 characters (28 in v1.1)</entry> <entry>v1.0, v1.1</entry> </row> <row> <entry>track</entry> <entry>integer between 0 and 255</entry> <entry>v1.1</entry> </row> </tbody> </tgroup> </table> </para> <para> See also <function>id3_get_tag</function>, <function>id3_remove_tag</function> and <function>id3_get_version</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.doc (#969361579) next »