List files in a directory with a checkbox. Then write 2 xml?
Posted: Sun Feb 19, 2006 10:23 pm
Okay, I'm really really sorry if this seems hard to do, but from what I've searched for, I've seen people easily come up with this, but I can't figure out how to combine it all. I'm really new to php coding. And I wanted to get a website I was doing for a school up in a few days.
Anyways, I made a XML flash player out of macromedia. Took me a while, but I did it. And I'm trying to do this.
Have a php script that reads all of the files in the directory (ex: files), and shows them in a list with a checkbox to the left of them (They're mp3's wma's etc).
Then I can select each listing (mp3 file) I want, then press a button below (Generate), and it creates an xml file for my mp3 player with the files it found.
My XML file is like this:
[/SIZE]
Where Holland Residence.mp3 is the file it found in the files folder. And then it strips off .mp3 and adds that to title.
Directory Structure Example:
script.php (Root Directory)
mp3player.swf (Root Directory)
xmlfile.xml (Root Directory)
-files
--Holland Residence.mp3
--From Concentrate.mp3
--Art Of Life.mp3
Thanks so much!!!
Anyways, I made a XML flash player out of macromedia. Took me a while, but I did it. And I'm trying to do this.
Have a php script that reads all of the files in the directory (ex: files), and shows them in a list with a checkbox to the left of them (They're mp3's wma's etc).
Then I can select each listing (mp3 file) I want, then press a button below (Generate), and it creates an xml file for my mp3 player with the files it found.
My XML file is like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<player showDisplay="yes" showPlaylist="yes" autoStart="yes"
>
<song path="http://www.bcomedia.com/files/Holland%20Residence.mp3" title="Holland Residence" />
<song path="http://www.bcomedia.com/files/From%20Concentrate.mp3" title="From Concentrate" />
<song path="http://www.bcomedia.com/files/Art%20Of%20Life.mp3" title="Art of Life" />Where Holland Residence.mp3 is the file it found in the files folder. And then it strips off .mp3 and adds that to title.
Directory Structure Example:
script.php (Root Directory)
mp3player.swf (Root Directory)
xmlfile.xml (Root Directory)
-files
--Holland Residence.mp3
--From Concentrate.mp3
--Art Of Life.mp3
Thanks so much!!!