XML Playlist Creator

Any software related topics go in here.
Post Reply
tjecco
Registered User
Posts: 168
Joined: 15 Jan 2007, 02:00
Contact:

XML Playlist Creator

Post by tjecco »

Hello Everyone

Does anyone know of a program (script) that can generate xml playlists for the flash music player.

I have 150 playlist to create and having to type out the path is starting to become way to much work.

oh it's for a network website.

Thanks in advance.
NZXT Appollo Case
DFI Intel Blood Iron Infinity P35-T2RL
Core Duo E7500
Corsair XMS2 Low-Latency Memory - DDR2-667MHz - 4GB Kit
Seagate St3250815AS Sata HDD
GTS250 256MB DDR3
Divoom Comet T1 5.1 Speakers
maxxis
Moderator Emeritus
Posts: 8307
Joined: 30 Jun 2004, 02:00
Location: ( . Y . )
Contact:

Re: XML Playlist Creator

Post by maxxis »

If the network is php enabled you can use the following code to create the information

Code: Select all


<?php

$dir = "images/surveillance";

echo "<?xml version='1.0' encoding='UTF-8'?>\n";
echo "<playlist>\n";

if (is_dir($dir)) {
	if ($d = opendir($dir)){
	
		while (($file = readdir($d))!== false){
			if (filetype($dir.'/'.$file) == 'file'){
				echo "	<song fname=\"folder/{$file}\"/>\n";
				//$vars .= "song fname=".$file;
				//echo $vars;
			}		
		}
		closedir($d);
	}
}
echo "</playlist>\n";



?>

That should generate the xml file with a list of songs in a folder.
Post Reply