Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

id3_get_version(3) [php man page]

ID3_GET_VERSION(3)							 1							ID3_GET_VERSION(3)

id3_get_version - Get version of an ID3 tag

SYNOPSIS
int id3_get_version (string $filename) DESCRIPTION
id3_get_version(3) retrieves the version(s) of the ID3 tag(s) in the MP3 file. 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. PARAMETERS
o $filename - The path to the MP3 file Instead of a filename you may also pass a valid stream resource RETURN VALUES
Returns the version number of the ID3 tag of the 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 ID3_V1_0, ID3_V1_1 and ID3_V2. EXAMPLES
Example #1 id3_get_version(3) example <?php $version = id3_get_version( "path/to/example.mp3" ); if ($version & ID3_V1_0) { echo "Contains a 1.x tag "; } if ($version & ID3_V1_1) { echo "Contains a 1.1 tag "; } if ($version & ID3_V2) { echo "Contains a 2.x tag "; } ?> The above example will output something similar to: Contains a 1.x tag Contains a 1.1 tag SEE ALSO
id3_set_tag(3), id3_get_tag(3), id3_remove_tag(3). PHP Documentation Group ID3_GET_VERSION(3)

Check Out this Related Man Page

ID3_GET_TAG(3)								 1							    ID3_GET_TAG(3)

id3_get_tag - Get all information stored in an ID3 tag

SYNOPSIS
array id3_get_tag (string $filename, [int $version = ID3_BEST]) DESCRIPTION
id3_get_tag(3) is used to get all information stored in the id3 tag of the specified file. PARAMETERS
o $filename - The path to the MP3 file Instead of a filename you may also pass a valid stream resource o $version - Allows you to specify the version of the tag as MP3 files may contain both, version 1.x and version 2.x tags Since version 0.2 id3_get_tag(3) also supports ID3 tags of version 2.2, 2.3 and 2.4. To extract information from these tags, pass one of the con- stants ID3_V2_2, ID3_V2_3 or ID3_V2_4 as the second parameter. ID3 v2.x tags can contain a lot more information about the MP3 file than ID3 v1.x tags. RETURN VALUES
Returns an associative array with various keys like: title, artist, .. The key genre will contain an integer between 0 and 147. You may use id3_get_genre_name(3) to convert it to a human readable string. EXAMPLES
Example #1 id3_get_tag(3) example <?php $tag = id3_get_tag( "path/to/example.mp3" ); print_r($tag); ?> The above example will output something similar to: Array ( [title] => DN-38416 [artist] => Re:Legion [album] => Reflections [year] => 2004 [genre] => 19 ) Example #2 id3_get_tag(3) example <?php $tag = id3_get_tag( "path/to/example2.mp3", ID3_V2_3 ); print_r($tag); ?> The above example will output something similar to: Array ( [copyright] => Dirty Mac [originalArtist] => Dirty Mac [composer] => Marcus Gotze [artist] => Dirty Mac [title] => Little Big Man [album] => Demo-Tape [track] => 5/12 [genre] => (17)Rock [year] => 2001 ) SEE ALSO
id3_set_tag(3), id3_remove_tag(3), id3_get_version(3). PHP Documentation Group ID3_GET_TAG(3)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ID3 tagging script

I'm trying to get a little script working with DropScript 0.5 that edits the ID3 tags of an MP3. Here's what I've got: #!/bin/sh # Strip directory part but leave extension. in_base=`basename "$@"` # Strip extension. in_noext=`echo "$in_base" | sed 's/\.*$//'` /opt/local/bin/id3v2... (4 Replies)
Discussion started by: SimonDorfman
4 Replies

2. Shell Programming and Scripting

grep

Hi, I have some files (650) each file has some information like subs number, hardware ID1, Hardware ID2, Hardware ID3 and 4. how can I get this informations from all files using a script ? I want to write those info to a file. like column1 (subs number) column2 (HwID1)......column4(HwID4) how... (5 Replies)
Discussion started by: alisevA3
5 Replies

3. Shell Programming and Scripting

Question about the here tag

Hello, Can you tell me why the last command(echo) in this script does not execute? In the command line I have to hit control -d to terminate this tag but I dont know how to do it in a shell script. sqlplus -s <<EOF connect / as sysdba select sysdate from dual; quit; EOF echo... (13 Replies)
Discussion started by: majormark
13 Replies

4. Shell Programming and Scripting

where am i wrong?

Hi anbody know where i'm wrong in? #!/bin/ksh ID1=1234 ID2=2345 ID3=3456 count=1 while do if ;then echo yeah else echo wrong fi count=$((count + 1)) done (8 Replies)
Discussion started by: summerpeh
8 Replies

5. Shell Programming and Scripting

Matching using Regex inside a file

I need scan through some files, then open the file one by one and scan inside the file using perl to see if it contain a start tag and end tag which the end tag is the mirror image of the start tag, the start tag and end tag only have 5 char. And inside the file there is "http://". It is just a... (5 Replies)
Discussion started by: blueblur
5 Replies

6. UNIX for Dummies Questions & Answers

replace characters with spaces between tag

I have a file where in some records are having the <Start> and <End> tag. There is data before the start tag , between the tages and after the End tag. I want to replace everything between the start & end tag with equivalent spaces. Input File afsdfaksddfs<start>12678<end>sgdfgdfsf... (6 Replies)
Discussion started by: varunrbs
6 Replies

7. Emergency UNIX and Linux Support

Shell scripting

The given file consists of two tags i.e., <free-energy> and <position> tag. I want the output like this. The tag <length> is not required to consider. (General format of output) free-energy no. first position no – second position no third position no – fourth position no ------ ... (8 Replies)
Discussion started by: hravisankar
8 Replies

8. Shell Programming and Scripting

Search and Append

All, I stuck up for the logic, how to implement the below thing in script. -Search for <a class="string-array"> line and in next line of search string append with <string>java</string> in a xml file The problem here is, <a class="string-array"> occurs multiple places in the xml. I just... (13 Replies)
Discussion started by: vino_hymi
13 Replies

9. Shell Programming and Scripting

web page source cleanup

is it possible to pass webpages to remove all tag style information, but leave the tag... say I have <h1 style='font-size: xxx; color: xxxxxx'>headline 1</h1> i want to get <h1>headline 1</h1> BTW, i got an oneliner here to remove all tags: sed -n '/^$/!{s/<*>//g;p; Thanks a... (4 Replies)
Discussion started by: dtdt
4 Replies

10. Shell Programming and Scripting

How to remove string inside html tag <a>

Does anybody know how i can remove string from <a> tag? There are several hundred posts in a few forums that need to be cleaned up. The precise situation is ---------- <a href="http://mydomain.com/cgi-bin/anyboard.cgi?fvp=/family/sexuality_and_spirituality/&cmd=rA&cG=43"> ------------- my... (6 Replies)
Discussion started by: georgi58
6 Replies

11. Shell Programming and Scripting

To search for a particular tag in xml and collate all similar tag values and display them count

I want to basically do the below thing. Suppose there is a tag called object1. I want to display an output for all similar tag values under heading of Object 1 and the count of the xmls. Please help File: <xml><object1>house</object1><object2>child</object2>... (9 Replies)
Discussion started by: srkmish
9 Replies

12. Shell Programming and Scripting

awk compare and keep uniq

Hi all I was wondering if you may help me in resolving an issue. In particular I have a file like this: the ... represent different string and what I wrote Cur or Ent are the constant. Well, what I would like to obtain is a file in which are reported only the ID in which the second column... (6 Replies)
Discussion started by: giuliangiuseppe
6 Replies

13. UNIX for Beginners Questions & Answers

Replacing tag based on condition

Hi All, I am having a file like below. The file will having information about the records.If you see the file the file is header and data. For example it have 1 men tag and the tag id will be come after headers. The change is I want to convert All pets tag from P to X. I did a sed like below... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies

14. What is on Your Mind?

New 'member_project' tag with DarkGreen (was Magenta) Color

Hi wisecracker, Thank you for posting this. Reference: Q: Is SQRT(n) possible in a POSIX... I think I will create a new tag for these kind of "tutorials" or "fun projects" similar to the "solved" tag which changes the color to blue; but the "member_project" tag would turn the color to... (14 Replies)
Discussion started by: Neo
14 Replies

15. UNIX for Beginners Questions & Answers

How do you preserve the max length of a line after replacing a specific value?

I'm new with scripting and I can't seem to figure out what I should do to get the output that I want. My file content would be below. ID2|ID3 |ID4|ID5 | I'm trying to replace the field of ID3 which has a fixed length of 10 characters, for each entry I have placed on a .txt file... (5 Replies)
Discussion started by: asdfghjkl
5 Replies