AndieB Posted September 7, 2007 Share Posted September 7, 2007 Hi all Gurus! My scenario: I have a FLASH Player that plays MP3 files on a webpage. The MP3 FLASH Player uses an playlist.xml to get it necessary information about name, title and .mp3 file location. In order to add, remove or edit my playlist, I need to download the playlist.xml file, edit it in a notepad application and than upload it again (together with the .mp3 files of course). My need of help: How do I create a PHP script that reads the file and publishes it so that I can edit it or add tracks using for example forms. Anyone who has a great script or know where to get one or perhaps knows a great "walkthrough"? Thanks in advance! Andreas Link to comment https://forums.phpfreaks.com/topic/68371-php-and-xml-edit-xml-file/ Share on other sites More sharing options...
sKunKbad Posted September 7, 2007 Share Posted September 7, 2007 what version php are you running? Link to comment https://forums.phpfreaks.com/topic/68371-php-and-xml-edit-xml-file/#findComment-343760 Share on other sites More sharing options...
AndieB Posted September 7, 2007 Author Share Posted September 7, 2007 what version php are you running? I am running PHP 5 if I am not totally out of knowledge... Link to comment https://forums.phpfreaks.com/topic/68371-php-and-xml-edit-xml-file/#findComment-343802 Share on other sites More sharing options...
AndieB Posted September 7, 2007 Author Share Posted September 7, 2007 The playlist XML file looks like this: <?xml version="1.0" encoding="UTF-8" ?> <playlist version="1" xmlns="http://xspf.org/ns/0/"> <title>HERE GOES THE TITLE</title> <info>http://www.jeroenwijering.com/?item=Flash_MP3_Player</info> <trackList> <!-- You need one of these blocks of code for each song in your playlist. --> <!-- You can simply copy-paste one of these blocks to add a song. --> <track> <!-- here you insert your song's title --> <annotation>90 Mix</annotation> <!-- here you insert the location of your mp3 file --> <location>mp3/90Mix.mp3</location> <!-- here you insert a link for this song, or leave it blank for no link --> <info></info> <!-- here you insert the location of the cover art jpg, or leave it blank --> <image></image> </track> <!-- this is the end of the code for one song --> </playlist> Link to comment https://forums.phpfreaks.com/topic/68371-php-and-xml-edit-xml-file/#findComment-343803 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.