![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jul 2006
Posts: 10
Rep Power: 0
![]() |
Displaying a Short description
Im making a sortof playlist type thing for a client and I want to a display a short description of the song is there anyway PHP can gather that information from the mp3 or from a playlist.
|
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
You can send a packet to google requesting the first page listing when searching for lyrics for a particular song via the ID3 information in the mp3 file or the filename it self...
__________________
|
|
|
|
|
|
#3 |
|
Expert Programmer
|
Are the files on your server? If so, I'm sure there's some way to extract that information from them.
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: Jul 2006
Posts: 10
Rep Power: 0
![]() |
yea they, are thats what i am asking how i would do that.
|
|
|
|
|
|
#5 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 769
Rep Power: 3
![]() |
This may be of some use, if you're using the ID3 tags...
|
|
|
|
|
|
#6 |
|
Expert Programmer
|
This might also be helpful; it explains how to extract such information from MP3 files in Python, but I'm sure the concepts are transferable to PHP.
|
|
|
|
|
|
#7 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 769
Rep Power: 3
![]() |
I think that PHP's id3_get_tag would still be easiest, especially as it's not restricted to the ID3v1 tags as the Python script is written for (I don't know how much the tags changed between versions). Of course, you will have to install the id3 package into your PHP installation, which may be a drawback...
|
|
|
|
|
|
#8 |
|
Newbie
Join Date: Jul 2006
Posts: 10
Rep Power: 0
![]() |
yea that does seem like a good way but it seems like i could just get the info from xml and not have to configure any extra packages which would be hard for my client to do anyways.
here is my code so far [PHP]<?php //select which song from url $song = $_GET['song']; //quicktime player that gets the source of the song from the url echo '<embed qtsrc='.$song.' height"256" width="320" src='.$song.' type="image/x-quicktime" pluginspage="[http://www.apple.com/quicktime/download/]" autoplay="true">'; /*Display current song and short description*/ //point variable to songlist.xml $songlist = "songlist.xml"; //connect to songlist.xml $songxml = simplexml_load_file($songlist); //set simple if statement that if a song is selected display song information if ( $song != NULL){ echo '<p id="soinginfo">Right now you are listing to '.$song.':<br/>'.$songxml->songlist->$song->description.'</p>'; } /*End display info settings*/ ?>[/PHP] and the xml file as an example <?xml version="1.0" encoding="iso-8859-1"?> <songlist> <title>Song List</title> <description>a list of songs and information</description> <shpadoinkle.mp3> <title>Shpadoinkle</title> <link>/jacobsite/Shpadoingkle.mp3</link> <description> My rendition of a song from Trey Parker’s first movie “Cannibal! The Musical.” I will be recording more from this spectacular movie and making a CD (which will be called “Jake Sherman Plays Trey Parker.”) Find out more about “Cannibal! The Musical” here: http://www.cannibalthemusical.net/index.shtml </description> </shpadoinkle.mp3> <danicalifornia.mp3> <title>Dani California</title> <link>/jacobsite/Dani_California.mp3</link> <description> A Song by the Red Hot Chilli Peppers on their new cd "Stadium Arcadium". </description> </danicalifornia.mp3> </songlist> |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how short can you make this | angry_asian | C++ | 19 | Jun 29th, 2006 7:27 PM |
| Little help | whoawhoayoyo | Assembly | 8 | Apr 18th, 2006 8:10 PM |
| Problem with extracting file description from .exe files!!! | Pedja | C++ | 3 | Dec 13th, 2005 12:23 PM |
| How to get application description? | Pedja | C# | 6 | Dec 11th, 2005 12:25 PM |
| vb6 to vb.net | bl00dninja | Visual Basic .NET | 2 | Sep 24th, 2005 2:55 PM |