adredz Posted January 23, 2008 Share Posted January 23, 2008 i've been searching all over the internet hoping to find some handy samples of PHP playlist but i couldn't find one that's very basic. it's my homework and i need a sample or template which i could fork out my own version from. i don't know how to do it from scratch. i know this is more than just a "how to" thing but i need it bady, you gotta help me do this...this might be my last resort of help coz i'm really burnt out googling...btw, i'm new here...hope i'm welcome... Quote Link to comment https://forums.phpfreaks.com/topic/87369-php-playlist/ Share on other sites More sharing options...
adam291086 Posted January 23, 2008 Share Posted January 23, 2008 Well here are a few steps to make a basic playlist 1) load the music files into a directory. 2) Open up that directory and display all the files. 3) Set the file names to = a link. That link will take the user to the files to play Quote Link to comment https://forums.phpfreaks.com/topic/87369-php-playlist/#findComment-446902 Share on other sites More sharing options...
adam291086 Posted January 23, 2008 Share Posted January 23, 2008 also i found this http://www.daniweb.com/blogs/entry689.html learn the coding in here and it will help Quote Link to comment https://forums.phpfreaks.com/topic/87369-php-playlist/#findComment-446904 Share on other sites More sharing options...
adredz Posted January 23, 2008 Author Share Posted January 23, 2008 wow!instant reply?!! this forum community is amazing... don't have this kind of experience before. you're saving my day guyz...i'll work on your suggestions right away... thanx Quote Link to comment https://forums.phpfreaks.com/topic/87369-php-playlist/#findComment-446911 Share on other sites More sharing options...
adam291086 Posted January 23, 2008 Share Posted January 23, 2008 the best way i find to code is to break down a project into smaller chucks. I.e upload script for files display the directory list set up the links then get a script that will play music then put it all together. Quote Link to comment https://forums.phpfreaks.com/topic/87369-php-playlist/#findComment-446913 Share on other sites More sharing options...
adredz Posted January 23, 2008 Author Share Posted January 23, 2008 guys, i appreciate you replies very much but i don't really understand them that much. i mean i got the logic but i don't know the right syntax. would you help me? i got a sample code from daniweb.com but i can't seem to work it out. im using a localhost server so basically i'll be using /localhost/playlist.php something path... here's the code... <?php $song = $_GET['song']; echo '<a href="/jacobsite/music.php?song=Shpadoinkle.mp3">Shpadoinkle</a><br/>'; echo '<a href="/jacobsite/music.php?song=Dani_California.mp3">Dani California</a><br/>'; echo '<embed qtsrc='.$song.' height"256" width="320" src='.$song.' type="image/x-quicktime" pluginspage="[http://www.apple.com/quicktime/download/]" autoplay="true">'; ?> obviously it won't work with the localhost. now my question is how would i link my mp3 files to this. i have the mp3 files saved in a diffrent folder named mp3 on the www folder under wamp folder.(i've installed wamp server myself, im pretty sure you guyz are familiar with this) and then i saved it(mp3 folder) on a folder named playlist together with my playlist.php file...any help pls???you could edit the code above if wouldn't mind.... Quote Link to comment https://forums.phpfreaks.com/topic/87369-php-playlist/#findComment-446932 Share on other sites More sharing options...
adredz Posted January 23, 2008 Author Share Posted January 23, 2008 guys, i appreciate you replies very much but i don't really understand it that much. i mean i got the logic but i don't know the right syntax. would you help me? i got a sample code from daniweb.com but i can't seem to work it out. im using a localhost server so basically i'll be using /localhost/playlist.php something path... here's the code... <?php $song = $_GET['song']; echo '<a href="/jacobsite/music.php?song=Shpadoinkle.mp3">Shpadoinkle</a><br/>'; echo '<a href="/jacobsite/music.php?song=Dani_California.mp3">Dani California</a><br/>'; echo '<embed qtsrc='.$song.' height"256" width="320" src='.$song.' type="image/x-quicktime" pluginspage="[http://www.apple.com/quicktime/download/]" autoplay="true">'; ?> obviously it won't work with the localhost. now my question is how would i link my mp3 files to this. i have the mp3 files saved in a diffrent folder name mp3 in the www folder under wamp folder.(i've installed wamp server myself, im pretty sure you guyz are familiar with it) and then i saved it(mp3 folder) on a folder named playlist together with my playlist.php file...any help pls???you could edit the code above if wouldn't mind.... Quote Link to comment https://forums.phpfreaks.com/topic/87369-php-playlist/#findComment-446936 Share on other sites More sharing options...
adredz Posted January 23, 2008 Author Share Posted January 23, 2008 got it! the link works now and the mp3 file successfullly played...next problem would be the GUI, don't have any idea how to load the song in it...anyway thanks for the help... Quote Link to comment https://forums.phpfreaks.com/topic/87369-php-playlist/#findComment-446950 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.