PC Nerd Posted September 14, 2007 Share Posted September 14, 2007 Hi, Im looking at creating a playlist program for my server. i have alist of files within my database, and i wanted to be able to place these values into a playlist file. the problem is that i dont know how to get the database to create the playlist form its records. ie, if i uploaded a new file to my server and into the database, then i woudl want the script to automatically grab that file ( SQL i know), anbd the nplace it in the m3u file ( i dont know). Coudl someone recommend a simple method to complete this? or point me in teh righ t doirection for a tutorial? thanks Quote Link to comment Share on other sites More sharing options...
effigy Posted September 14, 2007 Share Posted September 14, 2007 Format Example PHP Example Quote Link to comment Share on other sites More sharing options...
micah1701 Posted September 14, 2007 Share Posted September 14, 2007 i built a script to stream mp3 sermon podcasts for a church. <?php include('conection_info.php'); //file with mysql connection info $query = mysql_query("SELECT * FROM sermons WHERE id='$_GET[id]'"); $row = mysql_fetch_array($query); //update download count to track how many times this sermon has been played -obviously optional mysql_query("UPDATE sermons SET mp3plays = mp3plays + 1 WHERE id = '$_GET[id]' "); header("Content-type: audio/m3u"); header("Content-Disposition: inline; filename=".$_GET['id'].".m3u"); ?> http://www.ourwebsite.org/<?php echo $row['mp3Location']; ?> Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted September 14, 2007 Author Share Posted September 14, 2007 thanks. Ill go through those tutorials, and let you knwo how i go Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.