Re: Embedded player

From: Date: Thu, 19 Jan 2006 11:59:53 +0000
Subject: Re: Embedded player
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-228815@lists.php.net to get a copy of this message
Hi, You can use readdir() function for list the files. Here's a sample code from PHP Doc www.php.net/docs. if ($handle = opendir('/path/to/files')) { echo "Handler: $handle\n"; echo "Files:\n"; while (false !== ($file = readdir($handle))) { echo "$file\n"; } I don't know how that music player works, but since it uses XML for playlists, I think you can use readdir() then pass the results to XML. ----- Original Message ----- From: Jedidiah To: php-general@lists.php.net Sent: Thursday, January 19, 2006 9:36 AM Subject: [PHP] Embedded player Hi. I have been wanting to do something on my site for some time and was recently told that it could be accomplished. I started a daily devotion on our church website a few weeks ago, so I changed all of my files to .php and began using a MySQL database. I have a sermons page (www.mzbc.com/sermons.php) with a table with links to .wma sermons. When clicked in Firefox, it prompts to download. What I want is to be able to embed a player that will stay on that page and play all of the files in the table. I have found a player like this at http://musicplayer.sourceforge.net/. There is also a Windows Media style player that will do the same thing. The problem is I either have to create each individual sermon with an embedded player in a new page, or create a playlist. I will eventually have way to many sermons to use a playlist. I am sure there must be some way to tell each file in the table to open in that player, but I am not familiar yet with programming yet. I have php for dummies which I started reading, but I am not sure it will do what I want. Thanks so much, Jedidiah

« previous php.general (#228815) next »