Prev Previous Post   Next Post Next
Old 6th February 2004, 22:49   #6
pimpalize
Junior Member
 
Join Date: May 2003
Posts: 15
<?

function GetDirArray($sPath)

{
//Load Directory Into Array
$handle=opendir($sPath);
while ($file = readdir($handle))
{
$retVal[count($retVal)] = $file;
if (is_dir($sPath ."/". $retVal[count($retVal)-1])) $retVal[count($retVal) -1] = "/".$retVal[count($retVal)-1];
}
//Clean up and sort
closedir($handle);
sort($retVal);
return $retVal;
}

$PathToTheFiles = "./yourpath"; ##put directory of files here
$files = GetDirArray($PathToTheFiles);
for($x=0;$x < count($files);$x++)$str .= $files[$x] . chr(13) . chr(10);
$fp = fopen("playlist.lst","w");
fwrite($fp, $str, strlen($str));
fclose($fp);

echo "playlist built";
?>


just paste everything from <? until ?> in a file, name it blah.php, put it on your webserver, go to it in a browser or execute from shell, and presto, instant playlist, if you have php installed of course. you will have to delete the ./ and ../ from top of list, i didn't feel like coding that in, heh, enjoy, and ask if you have any more problems.
pimpalize is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump