Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 15th, 2006, 11:54 PM   #1
billpull
Newbie
 
Join Date: Jul 2006
Posts: 10
Rep Power: 0 billpull is on a distinguished road
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.
billpull is offline   Reply With Quote
Old Jul 16th, 2006, 12:49 AM   #2
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
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...
__________________

tempest is offline   Reply With Quote
Old Jul 16th, 2006, 12:52 AM   #3
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 837
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Are the files on your server? If so, I'm sure there's some way to extract that information from them.
titaniumdecoy is offline   Reply With Quote
Old Jul 16th, 2006, 1:32 AM   #4
billpull
Newbie
 
Join Date: Jul 2006
Posts: 10
Rep Power: 0 billpull is on a distinguished road
yea they, are thats what i am asking how i would do that.
billpull is offline   Reply With Quote
Old Jul 16th, 2006, 2:00 AM   #5
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 747
Rep Power: 3 Jimbo is on a distinguished road
This may be of some use, if you're using the ID3 tags...
Jimbo is offline   Reply With Quote
Old Jul 16th, 2006, 2:36 AM   #6
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 837
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
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.
titaniumdecoy is offline   Reply With Quote
Old Jul 16th, 2006, 3:02 AM   #7
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 747
Rep Power: 3 Jimbo is on a distinguished road
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...
Jimbo is offline   Reply With Quote
Old Jul 16th, 2006, 10:34 AM   #8
billpull
Newbie
 
Join Date: Jul 2006
Posts: 10
Rep Power: 0 billpull is on a distinguished road
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>
billpull is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how short can you make this angry_asian C++ 19 Jun 29th, 2006 6:27 PM
Little help whoawhoayoyo Assembly 8 Apr 18th, 2006 7:10 PM
Problem with extracting file description from .exe files!!! Pedja C++ 3 Dec 13th, 2005 11:23 AM
How to get application description? Pedja C# 6 Dec 11th, 2005 11:25 AM
vb6 to vb.net bl00dninja Visual Basic .NET 2 Sep 24th, 2005 1:55 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:55 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC