Page 1 of 1

need php script to generate a xml file with music info.

Posted: Sat May 09, 2009 5:21 pm
by awhite92
Hi,
OMG! I've been looking everywhere for help on making a php script that will create a xml file that looks something like this:

Code: Select all

 
<artists>
  <artist value="Jack Johnson">
    <album value="Greatest Hits">
      <song value="Banana Pancakes">
        <location>location/to.file</location>
      </song>
      <song value="song 2">
        <location>location/to.file</location>
      </song>
    </album>
    <album value="other album">
      <song value="song1">
        <location>location/to.file</location>
      </song>
      <song value="song 2">
        <location>location/to.file</location>
      </song>
    </album>
  </artist>
  <artist value="Metallica">
  ...
  </artist>
</artists>
 

i cant do this by hand cuz i got about 15 or so Gigs of songs.
i need this to use in a web music player i'm creating on my server for me and my brother to use.
and this is my first time going to a forum for help, i love doing stuff on my own, but this i can't seem to do.

any help would be Greatly Appreciated...

Re: need php script to generate a xml file with music info.

Posted: Sat May 09, 2009 5:32 pm
by Defiline

Re: need php script to generate a xml file with music info.

Posted: Sat May 09, 2009 5:40 pm
by awhite92
thx for the quick response Defiline,
but i'm still having trouble figuring out how to create the php script...

Re: need php script to generate a xml file with music info.

Posted: Sat May 09, 2009 10:14 pm
by awhite92
Ok I just wrote a script that will index the location to all of the files in my music/* Directory and sub folders.

now all i need a script that will separate all of them by artists >album > song in an xml file like the one in my original post for easy access in my music player.

any Ideas?

Re: need php script to generate a xml file with music info.

Posted: Tue May 19, 2009 11:07 pm
by awhite92
I have a list of file locations to mp3 files, i want to run through that and turn it in to a XML file like the one above...
:banghead: I don't know what to do now...