Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: id3_get_version - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

id3_remove_tag" width="11" height="7"/> <id3_get_tag
Last updated: Mon, 05 Feb 2007

view this page in

id3_get_version

(PECL)

id3_get_version — ID3 タグのバージョンを取得する

説明

int id3_get_version ( string filename )

id3_get_version() は、MP3 ファイル内の ID3 タグのバージョンを取得します。

あるファイルが ID3 v1.1 タグを含んでいるのなら、そのファイルは 常に 1.0 タグも含んでいます。というのも、バージョン 1.1 は単に 1.0 を拡張したものであるからです。

パラメータ

filename

MP3 ファイルへのパス。

ファイル名のかわりに、ストリームリソースを渡すことも可能です。

返り値

MP3 ファイル内の ID3 タグのバージョンを返します。 ID3 v1.x のタグおよび v2.x のタグを同時に保持することも可能なので、 この関数の返す値を利用する際には 定義済みの定数 ID3_V1_0ID3_V1_1 および ID3_V2 とのビット比較を行わなければなりません。

例 898. id3_get_version() の例

<?php
$version
= id3_get_version( "path/to/example.mp3" );
if (
$version & ID3_V1_0) {
    echo
"1.x タグを含んでいます\n";
}
if (
$version & ID3_V1_1) {
    echo
"1.1 タグを含んでいます\n";
}
if (
$version & ID3_V2) {
    echo
"2.x タグを含んでいます\n";
}
?>

上の例の出力は、たとえば 以下のようになります。


1.x タグを含んでいます
1.1 タグを含んでいます

    

参考

id3_set_tag()
id3_get_tag()
id3_remove_tag()



add a note add a note User Contributed Notes
id3_get_version
There are no user contributed notes for this page.

id3_remove_tag" width="11" height="7"/> <id3_get_tag
Last updated: Mon, 05 Feb 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites