PHP Classes

Radio: Create an online radio for serving music playlists

Recommend this page to a friend!
  Info   View files View files (9)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 57%Total: 5,498 This week: 2All time: 453 This week: 37Up
Version License Categories
radio 1.0.0Freely DistributableAudio
Description 

Author

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.

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
Picture of Rahman Haghparast
  Performance   Level  
Name: Rahman Haghparast <contact>
Classes: 10 packages by
Country: Iran Iran
Age: 43
All time rank: 751 in Iran Iran
Week rank: 50 Up1 in Iran Iran Equal
Innovation award
Innovation award
Nominee: 2x

Details

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. Installation: 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. License: 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: haghparast@gmail.com

  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

 Version Control Unique User Downloads Download Rankings  
 0%
Total:5,498
This week:2
All time:453
This week:37Up
User Ratings User Comments (1)
 All time
Utility:72%StarStarStarStar
Consistency:72%StarStarStarStar
Documentation:69%StarStarStarStar
Examples:69%StarStarStarStar
Tests:-
Videos:-
Overall:57%StarStarStar
Rank:1643
 
Excellent
14 years ago (kishore kumar)
80%StarStarStarStarStar