tutorials:other:online_playlist_on_your_website_with_php_mysql
This is an old revision of the document!
Table of Contents
This article explains how to implement a realtime playlist on your website, so that visitors can view the song currently played on air, and also get access an archive of all played songs.
Requirements
The solution presented here assumes that your website is running a web server with PHP enabled, and you also have access to an SQL server from there. Any kind of SQL server will do, we will use MySQL as an example as most people have that installed for their CMS/blog/forum anyway.
On the client (playout) side, you need a copy of mAirList with the HTTP GET logging interface available, i.e. at least Home Studio.
Architecture
Our solution works as follows:
- A list of all played songs (start time, artist, title) is kept in a MySQL table.
- We place a “secret” PHP script on the webserver that receives new entries from mAirList and places them into the table.
- mAirList uses HTTP GET logging to transfer the song information whenever you start a new song.
- When the user visits your website, the PHP script receives the current item from the table.
Setup
Preparing the MySQL Server
Preparing PHP Receive Script
Setting up mAirList HTTP Logging
Retrieving the Data
tutorials/other/online_playlist_on_your_website_with_php_mysql.1408007408.txt.gz · Last modified: 2019/07/09 16:19 (external edit)