I'm surprised not to find more questions about it, I might be the one on stackoverflow. How do I need to go to extract ID3 basic tags of one mp3 file with php ? Without downloading any librairies (I just want a neat function that returns an associative array key=a string that specifies the tag, value=a string that specifies the value of the tag).
I found many ways to do it but all require to download libraries with many functions that I don't need necessarily.
I don't want kiddyscripting. I want to build this function using fopen and reading the first bytes of the file according to the length of each tags (reading in the rfc).
Which functions will I need to use to get the bits (or the bytes converted in bits) ? But not the characters which are in the mp3, cause of course they are not text file.
Reading ID3-Tags is not as easy as "reading the first few bytes" (btw. ID3-V1 would be at the end and not the beginning) because most mp3's have ID3-V2 tags which are eighter at the beginning or the end of the file and they have dynamic lenght and encoding.
Why don't you just use an exsiting library, which does all the work for you (e.g. this)?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With