djsoftnet / radioboss-php-api
API Wrapper for RadioBoss
Installs: 41
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 2
Open Issues: 0
pkg:composer/djsoftnet/radioboss-php-api
Requires
- php: ^7.2
 - ext-json: *
 - ext-simplexml: *
 
This package is auto-updated.
Last update: 2025-10-16 23:47:01 UTC
README
This is a PHP wrapper/client for the RadioBoss API.
Table of Contents
Requirements
- PHP 7.2 or later.
 
Installation
Install it using Composer:
composer require djsoftnet/radioboss-php-api
General-Usage
Before using the RadioBoss API, you'll need to enable it in the RadioBoss Settings. After you have activated the API and set a password, you can retrieve data.
<?php require 'vendor/autoload.php'; $client = new \RadioBoss\RadioBossAPIClient("127.0.0.1", "9000"); $api = new \RadioBoss\RadioBossAPI($client);
Examples
- 
Track
- Get informations from Track Object (Artist, Title, Duration, ...)
$track->getArtist(); $track->getTitle(); $track->getDuration();
 - Get current Track
$api->getPlaybackInfo()->getCurrentTrack();
 - Get next Track
$api->getPlaybackInfo()->getNextTrack();
 - Get previous Track
$api->getPlaybackInfo()->getPreviousTrack();
 - Get last played Songs
//all last played songs $api->getLastPlayed(); //filters out songs that were not sent to the server $api->getLastPlayed(true);
 - Get Artwork of current or next Track
$api->getTrackArtwork(); $api->getNextTrackArtwork();
 - Set next Track
$api->setNextTack(123);
 - Read Track data by filename
$api->readTag("C:\Music\song.mp3");
 
 - Get informations from Track Object (Artist, Title, Duration, ...)
 - 
Playlist
- Get data from Playlist Object (Tracks, Track count)
$playlist->getTracks(); $playlist->getCount();
 - Get Playlist (provides all information, may be slow for some large Playlists)
//all songs $api->getPlaylist(); //only songs from 5-10 $api->getPlaylist(5, 10);
 - Get Playlist (doesn't provide all information)
//all songs $api->getPlaylist2(); //only songs the first 10 songs $api->getPlaylist2(10);
 
 - Get data from Playlist Object (Tracks, Track count)
 - 
Microphone
- Get Microphone status
$api->getMicrophone();
 - Enable/Disable Microphone
$api->setMicrophone(true); $api->setMicrophone(false);
 
 - Get Microphone status
 - 
Playback
- Get data from Playback Object (Position, Length, State, ...)
$playback->getPosition(); $playback->getLength(); $playback->getState();
 - Get Playback Object
$api->getPlaybackInfo()->getPlayback();
 
 - Get data from Playback Object (Position, Length, State, ...)
 - 
Encoder
- Get data from Encoder Object (Status, Error, ...)
$encoder->getStatus(); $encoder->getError();
 - Get Encoder Object
$api->getEncoderStatus();
 
 - Get data from Encoder Object (Status, Error, ...)
 - 
Player
- Get data from Player Object (Version, Uptime)
$player->getVersion(); $player->getUptime();
 - Get Player Object
$api->getStatus();
 
 - Get data from Player Object (Version, Uptime)