ok so i built a simple playlist type thing where the user can click a link and then the player will play that song. Now i would like for the page to get info from an xml file and then display a short description.
here is my php:
<?php
//select which song from url
$song = $_GET['song'];
$songfile = ''.$song.'.mp3';
//quicktime player that gets the source of the song from the url
echo '<embed qtsrc='.$songfile.' height"256" width="320" src='.$songfile.' 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*/
?>
and here is the xml with some example songs
<?xml version="1.0" encoding="iso-8859-1"?>
<songlist>
<title>Song List</title>
<description>a list of songs and information</description>
<shpadoinkle>
<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>
<danicalifornia>
<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>
</songlist>