xspfphp Code
Status: Beta
Brought to you by:
trbailey
See included readme.html for more info. To install: 1. Unzip to local directory for editing. 2. Edit original.xspf.settings.php check $DirFile variable making sure it points to your xspf.dir file. To enable caching, create a new MySql database or you can use an existing database. You must provide a user with create_table and delete_table permissions. The cache requires one table named id3_cache. It can reside in any databse you desire. Edit xspf.settings.php change -> $cached = true change -> $dbhost = 'localhost'; change -> $dbname = 'xspf'; change -> $dbuser = 'yourdbuser'; change -> $dbpass = 'yourdbpass'; The script will create any tables it needs. To reset the cache use: xspf.php?reset 3. Upload all files to your server if you haven't already, don't forget the music. 4. Create playlist configuration Version >0.09 includes an autogen for the xspf.dir file. Use it if you have a music directory containing many subdirectories. Autogen Usage: copy xspf.autogen.php to your music base directory on the server Navigate to it in a browser. Autogen creates auto.xspf.dir Check or edit the output and save or rename as xspf.dir Manual xspf.dir creation: Create a new text file named xspf.dir file containing a single line for each directory on the server you want to scan. Each line begins with the server path followed by ONE space then the URL for that directory. Optionally you may add an info link for the directory. You'll need to enable links in the settings file to see info links. #comments begin with a # Examples: ----[path]---------- ----[url]-------------------------- ----[info link]--------------- /var/www/xspf/music/ http://www.trbailey.net/xspf/music/ http://www.trbailey.net/music/ /var/www/xspf/music/ http://www.domain.com/xspf/music/ http://your.info.link/file.html /var/www/music/ http://www.domain.com/music/ http://another.info/link.html ./ http://url.to.current.dir/ http://infolink.for.current.dir # make sure there is an empty line at the end of the file # make sure each parameter ends in a / Testing: Navigate to xspf.php on your server in your installation directory. You should see a playlist. Navigate to player.php or sample1.html in same directory to test links. Help or comments to siggma@trbailey.net