Read MP3 Tag directly from $variable

Locked
wtf
User
Posts: 2
Joined: Wed Dec 12, 2012 10:24 am
Are you a spambot?: no

Read MP3 Tag directly from $variable

Post by wtf » Wed Dec 12, 2012 10:34 am

I have an MP3 loaded into a PHP $variable, is it possible to get MP3 Tags directly from this variable?

James Heinrich
getID3() v1 developer
Posts: 1457
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Read MP3 Tag directly from $variable

Post by James Heinrich » Wed Dec 12, 2012 2:49 pm

It is possible, you'll need to instantiate both a getID3 and getid3_handler object, and make your call to getid3_handler->AnalyzeString rather than getid3->analyze

The alternative is you can dump the file contents to a temp file, analyze it, then delete the temp file, but that shouldn't be necessary.

wtf
User
Posts: 2
Joined: Wed Dec 12, 2012 10:24 am
Are you a spambot?: no

Re: Read MP3 Tag directly from $variable

Post by wtf » Wed Dec 12, 2012 3:02 pm

ok, i'll try it out, thank you

Locked