wibblywobbly
New Member
Hello All,
This is something I'm really eager to get working, and I'm part of the way there
What I want:
To have an MP3 player on a web page. When people upload their MP3's to a specific folder online, the player automatically adds the songs to it's playlist. When people delete the songs from that folder, they are removed from the playlist.
I've worked with a friend and we are part way there.
www.wibblywobblywebsite.com/testzone/test.html
The PHP code inside the folder with the MPs looks like this:
Here is the page with the player on it:
The Playlist is formed, but the songs won't play.
I really don't know coding very well. Can anyone see how to get this working?
The idea is, that users will be able to upload songs from a content management system into this folder and the MP3 player will play them.
On another design forum, someone said that I was missing part of the URL's, could this be it?
Many thanks in advance for your help!
- Wibbly
This is something I'm really eager to get working, and I'm part of the way there
What I want:
To have an MP3 player on a web page. When people upload their MP3's to a specific folder online, the player automatically adds the songs to it's playlist. When people delete the songs from that folder, they are removed from the playlist.
I've worked with a friend and we are part way there.
www.wibblywobblywebsite.com/testzone/test.html
The PHP code inside the folder with the MPs looks like this:
Code:
<?
function isMp3($filename){
$ext = substr($filename, -4);
if($ext == '.mp3'){
return true;
}else{
return false;
}
}
$d = dir(getcwd());
while (false !== ($filename = $d->read())) {
if(isMp3($filename)){
$playlist .= $filename . '|';
}
}
$d->close();
echo "mp3=" . substr($playlist, 0, strlen($playlist) - 1);
?>
Here is the page with the player on it:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<div>
<object type="application/x-shockwave-flash" data="http://www.wibblywobblywebsite.com/testzone/player/player_mp3_multi.swf" height=500 width=500>
<param name="movie" value="http://www.wibblywobbywebsite.com/testzone/player/player_mp3_multi.swf" />
<param name="wmode" value="transparent" />
<param name="FlashVars" value="config=http://www.wibblywobblywebsite.com/testzone/playlist/playlist.php" />
</object>
</div>
</body>
</html>
The Playlist is formed, but the songs won't play.
I really don't know coding very well. Can anyone see how to get this working?
The idea is, that users will be able to upload songs from a content management system into this folder and the MP3 player will play them.
On another design forum, someone said that I was missing part of the URL's, could this be it?
Many thanks in advance for your help!
- Wibbly