PHP Classes

Radio: Create an online radio for serving music playlists

Recommend this page to a friend!

  Author Author  
Picture of Rahman Haghparast
Name: Rahman Haghparast <contact>
Classes: 10 packages by
Country: Iran Iran
Age: 42
All time rank: 751 in Iran Iran
Week rank: 30 Up1 in Iran Iran Equal
Innovation award
Innovation award
Nominee: 2x

  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class is a simple class that can be used to create an online radio by serving playlists of music streams that should be played one after another.

It can work with three different types of music streams: MP3, WMA and Real Audio.

A sample HTML file is included to show how the class can be used to play audio files with Windows Media Player object.

This class is written to enable offline radio making with php. My definition for offline radio is a set of recorded files that is played continuously after each other.
it can work with three different file types. The supported file types are mp3,wma and ra(real audio). A sample html file is included to show how u can play audio files with media player obeject in html.

unzip the downloaded file and make a folder in your webserver root directory. name it something like "radio". The index file is a simple html file that points to radio.html file and open it in a popup window. The reason is to open it in the small size for better view. After that u need to change either start.php or start_timetable.php file. replace localhost with your webserver name or ip address. do the same in radio.html or radio_timetable.html too. radio.html will play the list of sound files in the $playlist variable in start.php file. radio_timetable.html will play sound files according to the timetable.txt file. The structure of timetable.txt is very simple. it is a comma seperated file. the first column is the url of the sound files and the second column is the time to broadcast it at the end of each line I used return code ( chr(13) ) sign as a delimeter. It means that you should push the Enter button at the end of each line. The start_timetable.php checks to see what time of the day a user has requested the page and according to the timetable.txt will start broadcasting.

This program is free to use under the following condition:
The user of this program should send the url of the site that uses this program and write my email address in the meta tags of the page.

Please send any comments and questions to my email address:

  Classes of Rahman Haghparast  >  Radio  >  Download Download .zip .tar.gz  >  Support forum Support forum (2)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Radio
Base name: radio
Description: Create an online radio for serving music playlists
Version: 1.0.0
PHP version: -
License: Freely Distributable
All time users: 5438 users
All time rank: 462
Week users: 3 users
Week rank: 71 Up
  Groups   Rate classes User ratings   Applications   Files Files  

Group folder image Audio Voice and music data generation and manipulation View top rated classes

  Innovation Award  
PHP Programming Innovation award nominee
February 2005
Number 5

Prize: One copy of DWeb Pro Lifetime License
An online radio is an interesting service that is provided by many entertainment sites.

A live radio station requires a dedicated audio stream server. But if you only want to serve pre-recorded music, a simple alternative may consist only of Web site that serves playlists that point to sources of music streams that may even be made available by unrelated sites.

This class simplifies the process of serving playlists generated dynamically by a simple online radio site that anybody can produce without many resources.

Manuel Lemos

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Sufficient (75%) Sufficient (75%) Sufficient (71%) Sufficient (71%) - - Not sure (59%) 1425
Month: Not yet rated by the users

  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Accessible without login HTML file index.html Data the start page of the sample
Plain text file radio.class.php Class The main class
Accessible without login HTML file radio.html Data the html to make the radio !
Accessible without login HTML file radio_timetable.html Data a radio with time table
Accessible without login Plain text file readme.txt Doc. Readme before you do anything!
Accessible without login Plain text file start.php Example a sample php file to run the class !
Accessible without login Plain text file start_timetable.php Example a php initialzation file for time table mode
Accessible without login Plain text file timetable.txt Example time table file
Accessible without login Image file title.jpg Photo a simple pic

Install with Composer Install with Composer - Download Download all files: radio.tar.gz
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
For more information send a message to info at phpclasses dot org.