+ 3

how to develop dynamic music player web page?

I wanted to develop a music player web page that fetches audio files automatically from a specified folder and adds to the list of music in the page. so that whenever there is a new audio file in that folder it adds to the music list which then can be played. How to do it in php and html?

10th Jun 2020, 9:25 AM
Me&You
Me&You - avatar
2 odpowiedzi
+ 2
Cool project! But too big for us to fit all the details in a single answer. You will need some javascript if you want to automatically grab new songs. You need to break down the problem: 1) Write a PHP program that prints out the list of songs in that folder (google: glob php) 2) Write a HTML/Javascript application that asks your PHP code to return that list. (google: fetch javascript) 3) Put it in an <audio> tag. 4) Once you are there, worry about the next steps. You will also need a webserver - have you heard of XAMPP?
10th Jun 2020, 1:11 PM
Schindlabua
Schindlabua - avatar
+ 1
Schindlabua thank you for your help. It is really great. I designed the page using html and css. I also have some basic js knowledge. Html DOMs. The only place I got stuck was in php, didn't know how to fetch the files and how to automate it also. It was a great help. Thanks again
11th Jun 2020, 5:18 AM
Me&You
Me&You - avatar