s0c0 Posted February 6, 2007 Share Posted February 6, 2007 I would like an easy way of reading(writing is a plus) id3 tags. I have googled this and there is no easy way. PHP.Net has the following site http://us3.php.net/manual/en/ref.id3.php and I see that I have to install PEAR which I have and then install a pecl extension. I'm not very good with compiling and was wondering if anyone new of a suse yast repository that contains these or at least an RPM? Or perhaps another way of getting id3 tags? Quote Link to comment Share on other sites More sharing options...
ultrus Posted February 6, 2007 Share Posted February 6, 2007 Hello s0c0, I did a search at phpclasses.org for "id3" and found this: http://www.phpclasses.org/browse/package/2462.html There were some other results as well, but I'm not sure if pear is required or not. When I can't find it on google, I seem to find it there lately. Hope this helps! Quote Link to comment Share on other sites More sharing options...
s0c0 Posted February 6, 2007 Author Share Posted February 6, 2007 I'm not sure that this is going to work (this isn't for personal use this is a project/webapp) and furthermore I'm not sure on how to use classes. I'm sure it's in my php book and I'll research using classes tonight. If anyone else has ideas please do tell. Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted February 6, 2007 Share Posted February 6, 2007 Check a book called Digital Audio Essentials by Bruce Fries, Marty Fries It's something that will cover (among other things) how this can be accomplished in PHP. Quote Link to comment Share on other sites More sharing options...
s0c0 Posted February 6, 2007 Author Share Posted February 6, 2007 Check a book called Digital Audio Essentials by Bruce Fries, Marty Fries It's something that will cover (among other things) how this can be accomplished in PHP. Your wrote this book, didn't you? Quote Link to comment Share on other sites More sharing options...
Hypnos Posted February 7, 2007 Share Posted February 7, 2007 http://us3.php.net/manual/en/ref.id3.php Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted February 7, 2007 Share Posted February 7, 2007 no Quote Link to comment Share on other sites More sharing options...
s0c0 Posted February 9, 2007 Author Share Posted February 9, 2007 I solved this on my own. Go to the id3 project page [ http://getid3.sourceforge.net/ ] and download the latest stable version. I downloaded version 1.7.7. Then extract the files contents to your web servers root folder. The readme contains the rest of the information . I was able to pick up the syntax quickly by analyzing the PHP scripts in the demo directory. Here's an example piece of code: <? php require_once('/srv/www/htdocs/getid3/getid3/getid3.php'); $getID3 = new getID3; $filename = "/srv/www/htdocs/Wu-Tang Clan - Cream.mp3"; $ThisFileInfo = $getID3->analyze($filename); getid3_lib::CopyTagsToComments($ThisFileInfo); echo @$ThisFileInfo['comments_html']['artist'][0] ."<br/>"; echo @$ThisFileInfo['tags']['id3v2']['title'][0] ."<br/>"; echo @$ThisFileInfo['audio']['bitrate'] ."<br/>"; echo @$ThisFileInfo['playtime_string'] ."<br/>"; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.