MediaCP Manual
    1. Getting Started
    2. Sales Questions
    3. Frequently Asked Questions
    4. Transcoder System Benchmarks
    5. Start your own streaming platform
    1. Change account currency
    2. Product Licensing
    1. Introduction
    2. Installation & Upgrade
      1. System Requirements
      2. Versions & Releases
      3. Installation
      4. Upgrading
      5. SSL Certificates
      6. Streaming Servers
        1. Nginx-Rtmp Video Server
        2. Wowza Streaming Engine
        3. Flussonic Media Server
        4. Video Feature Comparison
        5. Icecast 2 / Icecast KH
    3. Billing Integration
      1. WHMCS Integration Guide
      2. Clientexec Integration Guide
      3. Blesta Integration Guide
    4. Migrate from other software
      1. Migrate From Centovacast
      2. Migrate From AzuraCast
    5. Backup & Restoration
      1. Backup MediaCP
      2. Restore MediaCP
      3. Transfer to another server
    6. Administration
      1. MediaCP System Commands
      2. Change MediaCP domain name
      3. Move media to another hard disk
      4. Secure your server
      5. Troubleshooting Login Errors
      6. Custom Facebook App
      7. Custom Web Service Configurations
      8. Reset Admin Password
      9. Port 80 / 443 Proxy
      10. Admin Tools
    7. Scaling
      1. Scale with Wowza and CloudFront CDN
      2. Nginx-Rtmp with CloudFront CDN
    8. Troubleshooting
      1. MySQL Database Troubleshooting
      2. Reporting Troubleshooting
      3. Troubleshooting Liquidsoap AutoDJ
      4. Video Relay Troubleshooting
      5. Grant access to support team
      6. Troubleshooting Wowza Streaming Engine
      7. FTP Troubleshooting
    1. Introduction
    2. Administrators Dashboard
    3. System Configuration
      1. General
      2. Services
      3. Video Players
      4. Albums
      5. Email
      6. Plugins
      7. Statistics
      8. Backups
      9. Custom HTML
      10. Misc
    4. Customer Accounts
      1. Managing existing Customers
      2. Create a new Customer
      3. Deleting a Customer
      4. Send email to Customer
      5. Login as another Customer
      6. Reset Customer Password
    5. Reseller Accounts
      1. Reseller Plans
      2. Create a Reseller Account
    6. Media Services
      1. Creating a Media Service
      2. Deleting a Media Service
    7. Announcements
      1. Managing Announcements
      2. Creating Announcement
      3. Deleting Announcement
    8. Statistics
    9. Software Health
    10. Software Updates
    11. Email Templates
    12. API
    1. Introduction
    2. Video Operation Manual
      1. Basics 101
      2. Service Overview
      3. File Manager
      4. Scheduling
      5. Streaming to Your Service
      6. Stream Targets
      7. GeoIP Country Locking
      8. Widgets & Links
      9. Reporting
    3. Audio Operation Manual
      1. Basics 101
      2. Station Overview
      3. Media Library
      4. Playlists
        1. General Rotation
        2. Jingles & Advertising
        3. Scheduling
        4. Repeat Protection
      5. Live DJ Connections
      6. Live Stream Recording
      7. DJ Manager
      8. Country Blocking
      9. Stream Proxy
      10. Stream Authentication
      11. Widgets & Links
      12. Reporting
    4. Reseller Operations Manual
      1. Reseller Dashboard
      2. Customers
      3. Media Services
    1. Wowza and Flussonic on same system
    2. Submit a feature request
    3. Wowza Custom Properties
    4. API Documentation
    5. Custom Domain Names
    6. Shoutcast 2 Admin Guide
    1. Broadcasting with AutoDJ
    2. Shoutcast 2 Premium
    3. Mount Points
    4. Managing Media Using FTP
    5. Shoutcast 2 Live Broadcasting
    6. DJ Priorities
    7. HTML5 Audio Player
    1. Getting started with video streaming
    2. Live Streaming Overview
    3. TV Station Overview
    4. Ondemand Video Streaming
    5. GeoIP Country Locking
    6. VAST Advertising
    7. Relay & IP Camera
    8. Stream Recording
    9. Connecting your encoder
    10. Preparing Your Media Files
    11. Managing Media Using FTP
    12. Understanding Video Playlists
    13. Embedding player on your website
    14. Smooth Streaming and Content Transition
    15. Video Transcoding (Adaptive Bitrate Streaming)
    16. Image Logo or Watermark Overlay on Video Stream
    17. DVR Rewind
    18. Statistics
    19. Facebook Live Streaming
    20. Youtube Stream Publishing
    21. Twitch Stream Publishing
    22. Shoutcast 2 Stream Publishing
    23. Icecast Stream Publishing
    24. RTMP Stream Publishing
    1. Cloud Video Overview
    2. Admin Manual - Cloud Video
      1. Team & Staff Members
      2. Plans & Customers
      3. WHMCS Billing Provisioning Module
      4. Login to your cloud platform
      5. Dashboard - A First Look
      6. Branding your platform
      7. Activating VOD on Customer Plan
    3. User Manual - Cloud Video
      1. Login to your video platform
      2. First Look
      3. Creating a Channel
      4. Channel Overview
      5. Broadcasting
      6. Media Content
      7. Recording
      8. Fallback Video
      9. TV Channels - 24x7 UGC
      10. Video on Demand
      11. VOD Playlists
      12. Publishing
      13. Viewing Analytics
      14. Publish Zoom Meetings
      15. Advertising
      16. Restreaming IP Cameras
    4. Video Guide Series
    5. Streaming Best Practices
    6. Feature Comparison
    7. Roadmap & Release Notes
API Documentation

Last updated 2 years ago

It is possible to connect to and perform various functions remotely with the control panel using PHP.

You will be required to download and include the XML-RPC Library for PHP:
https://code.google.com/archive/p/php-ixr/

Table of Contents

  1. Admin Functions
  2. Service Functions
  3. Source Functions

 

Admin Functions

admin.service_list

List all MediaCP services.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
username The user account to list services from.
plugin NoService
shoutcast198
shoutcast2
icecast
wowzaMedia
Flussonic
NginxRtmp
sourceplugin liquidsoap
ices04
ices20
sctransv1
sctransv2
streamtranscoderv3
Specify a source (autodj) to use with the service if supported.

PHP Sample

  <?php
   require_once("../IXR_Library.php");

   $url = "https://demo.mediacp.net/";
   $command = "admin.service_list";
   $arguments = array(
   "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw=="
   )
   );

   $client = new IXR_ClientSSL($url. '/system/rpc.php');
   $client->debug = true; /** Set to true if you have difficulties **/

   if ( !$client->query( $command, $arguments) ) {
   die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage());
   }

   $return = $client->getResponse();

   if ( $return['status'] == 'success' ){
   echo $command. ' executed successfully.';
   }else{
   echo 'failed executing '. $command;
   }

   /** Output debugging information **/
   print_r( $return );

   ?>

admin.service_create

Create a new media streaming service attached to a specific customer account.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
username * The user account to create service upon.
userid ALTERNATIVE to specifying username, specify the customers userid instead.
plugin * NoService
shoutcast198
shoutcast2
icecast
windowsMediaServices
wowzaMedia
Flussonic
sourceplugin ices04
ices20
sctransv1
sctransv2
streamtranscoderv3
Specify a source (autodj) to use with the service if supported.
unique_id * Alphanumeric String (no special characters allowed) The Publish Name to identify the service, for example myShoutcastServer1
portbase INTEGER Specify a port for the service to run on, will otherwise will determined automatically.
rpc_extra BOOL (true/false) If set to true will return an array of the entire service configuration that is created.
maxuser INT (0-99999) Maximum connections to the service.
bitrate 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 400, 480, 560, 640, 720, 800, 920, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584, 4096, 99999 Enter only one of the values in the options column. This may also contain “Kbps” at the end of the option value.
bandwidth INT Maximum Data Transfer per month in MB, specify 0 for no limit.
quota Maximum disk space allocation for service (defaults to 30). Set to 0 for no limit.
customfields ARRAY Specify an array of additional service specific configuration options. You can identify the available parameters by querying an existing service using service.overview. See below PHP Example for more information.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "admin.service_create"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "username" => "admin", 
 "plugin" => "shoutcast198", 
 "sourceplugin" => "",
 "password" => "mypassword", 
 "maxuser" => "25", 
 "bitrate" => "48", 
 "bandwidth" => "10240", 
 "quota" => "1024", 
 "customfields" => array(
 "rtmpenabled" => "yes"
 )
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

admin.service_remove

Permanently removes a media service from the control panel.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
serverid INT The Service ID to be stopped and removed from the control panel.
unique_id INT ALTERNATIVE to serverid, specify the unique_id of the service to be removed.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "admin.service_remove"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "serverid" => 10
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

admin.service_suspend

Suspends and immediately stops a specific media service.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.
unique_id INT ALTERNATIVE to serverid, specify the unique_id of the service to be removed.
Reason STRING The reason for suspension
Days INT Number of days to suspend service for, or specify “indefinite” for permanent suspension.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "admin.service_suspend"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10, 
 "Reason" => "Failed to complete payment", 
 "Days" => 30
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

admin.service_unsuspend

Unsuspends the service and attempts to restart the media service.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.
unique_id INT ALTERNATIVE to serverid, specify the unique_id of the service to be removed.
<?php
 require_once("../IXR_Library.php");

 $url = "http://localhost/mediacp/";
 $command = "admin.service_unsuspend";
 $arguments = array(
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==",
 "ServerID" => 10,
 );

 $client = new IXR_Client($url. '/system/rpc.php');
 $client->debug = true; /** Set to true if you have difficulties **/

 if ( !$client->query( $command, $arguments) ) {
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage());
 }

 $return = $client->getResponse();

 if ( $return['status'] == 'success' ){
 echo $command. ' executed successfully.';
 }else{
 echo 'failed executing '. $command;
 }

 /** Output debugging information **/
 print_r( $return );

?>

admin.service_update

Updates the configuration of a specific media service.

The below table provides a minimal list of available configurations, you can specify and update any parameter that is returned by service.overview for the specific service, noting that each Media Service (Shoutcast, Icecast, Wowza etc) have different configurations available.

We advise that you do not change the following values as they may cause issues with your service: plugin, sourceplugin, servicetype, portbase.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
serverid * INT The Service ID to be stopped and removed from the control panel.
unique_id INT ALTERNATIVE to serverid, specify the unique_id of the service to be removed.
username The user account to create service upon.
userid ALTERNATIVE to specifying username, specify the customers userid instead.
maxuser INT (0-99999) Maximum connections to the service.
bitrate 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 400, 480, 560, 640, 720, 800, 920, 1024, 1280, 1536, 1792, 2048, 2560, 3072, 3584, 4096, 99999 Enter only one of the values in the options column. This may also contain “Kbps” at the end of the option value.
bandwidth INT Maximum Data Transfer per month in MB, specify 0 for no limit.
quota Maximum disk space allocation for service (defaults to 30). Set to 0 for no limit.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "admin.service_update"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "serverid" => 10, 
 
 "password" => "mypassword", 
 "maxuser" => "25", 
 "bitrate" => "48", 
 "bandwidth" => "10240", 
 "quota" => "1024"
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

admin.user_create

Create a new customer account within the control panel.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
username ALPHANUMERIC Some special characters are also allowed such as a period, underscore and at symbol.
hash A SHA1 hash combination of the username and password. For example: SHA1( �username� . �password� )
user_level 0 Customer
2 Super Administrator
name ALPHANUMERIC Customers Full name
reseller_plan INTEGER Specify the reseller plan ID if you want to assign the account as a reseller
activated 0 or 1
theme Specify a theme to use for this account, otherwise the default will be used.
language Specify a language to use for this account, otherwise the default will be used.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "admin.user_create"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "username" => "[email protected]", 
 "hash" => SHA1("[email protected]" . "mypassword"), 
 "user_level" => 0,
 "name" => "My Customer", 
 "activated" => 1, 
 "reseller_plan" => 1,
 "theme" => "Experience", 
 "language" => "english"
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

admin.user_update

Update a specific customer account.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
username * Specify the user account that you wish to update
userid ALTERNATIVE to the username, specify the customer id.
hash A SHA1 hash combination of the username and password. For example: SHA1( �username� . �password� )
user_level 0 Customer
2 Super Administrator
name ALPHANUMERIC Customers Full name
activated 0 or 1
theme Specify a theme to use for this account, otherwise the default will be used.
language Specify a language to use for this account, otherwise the default will be used.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "admin.user_update"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "username" => "[email protected]", 
 "hash" => SHA1("[email protected]" . "mynewpassword"), 
 "user_level" => 0,
 "name" => "My Customer", 
 "activated" => 1, 
 "reseller_plan" => 1,
 "theme" => "Experience", 
 "language" => "english"
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

admin.user_remove

Removes a specific customer account.

NOTE: All media services under the account MUST be removed before customer account can be removed.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
username * Specify the user account that you wish to update
userid ALTERNATIVE to the username, specify the customer id.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "admin.user_remove"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "username" => "[email protected]", 
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

Service Functions

service.overview

Outputs an array of the entire service configuration.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID * INT The Service ID to be stopped and removed from the control panel.
unique_id INT ALTERNATIVE to serverid, specify the unique_id of the service to be removed.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "service.overview"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

service.status

Returns the status of the service with one of the following responses.

  • failed – Unable to lookup service
  • offline – Service is Offline.
  • online – Service is Online
  • suspended – Service is Suspended
  • expired – Service is Expired
  • unconnectable – Service is unreachable

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
serverid INT The Service ID to be stopped and removed from the control panel.
unique_id INT ALTERNATIVE to serverid, specify the unique_id of the service to be removed.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "service.status"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "serverid" => 10
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

service.start

Starts a specific media service.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.
unique_id INT ALTERNATIVE to serverid, specify the unique_id of the service to be removed.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "service.start"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

service.stop

Stops a specific media service.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.
unique_id INT ALTERNATIVE to serverid, specify the unique_id of the service to be removed.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "service.stop"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

service.restart

Restarts a specific media service.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.
unique_id INT ALTERNATIVE to serverid, specify the unique_id of the service to be removed.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "service.restart"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

service.updatetitle

Updates the Now Playing title of a live stream.

Only compatible with Shoutcast 198, Shoutcast 2, Icecast 2 & Icecast KH.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.
unique_id INT ALTERNATIVE to serverid, specify the unique_id of the service to be removed.
NewTitle STRING (250 chars) Text to replace the current Now Playing title of a live stream.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "service.updatetitle"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10,
 "NewTitle" => "This control panel is the greatest"
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

service.kicksource

Kicks the active source on a live stream.

Only compatible with Shoutcast 198, Shoutcast 2, Icecast 2 & Icecast KH.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "service.kicksource"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

service.wowza_alias

Manage the Stream Alias’ of a Wowza Streaming Engine Service.

Only compatible with Wowza Streaming Engine services.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.
action create
remove
The action to perform with the specified alias
alias STRING (50 char) The alias stream name that can be viewed. rtmp://myserver/myapplication/myalias
name STRING (50 char) The actual origin stream that will be viewed. Default ${Stream.Name}

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "service.wowza_alias"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10,
 "alias" => "myalias",
 "name" => "${Stream.Name}"
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

service.wowza_tvschedule

Return a list of scheduled playlists from a Wowza TV Station service.

Only compatible with Wowza Streaming Engine services.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID * INT The Service ID to be stopped and removed from the control panel.
date_start MySQL datetime field format YYYY-MM-DD HH:MM:DD
date_end MySQL datetime field format YYYY-MM-DD HH:MM:DD

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "service.wowza_alias"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10,
 "date_start" => "2015-01-01 00:00:00",
 "date_end" => "2015-01-01 23:00:00"
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

service.wowza_tvschedule_playlist

Returns an array of scheduled files in a specific TV Station playlist.

Only compatible with Wowza Streaming Engine services.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID * INT The Service ID to be stopped and removed from the control panel.
playlist_id INT The playlist id that you wish to retrieve.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "service.wowza_alias"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10,
 "playlist_id" => "1"
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

Source Functions

source.list_playlists

Returns an array of available playlists that have been created under the customer account.

Only compatible with Shoutcast 198, Shoutcast 2, Icecast 2 & Icecast KH.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "source.list_playlists"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

source.status

Returns the status of the source (AutoDJ).

Only compatible with Shoutcast 198, Shoutcast 2, Icecast 2 & Icecast KH.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "source.status"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10 
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

source.restart

Restarts the source plugin associated with a specific service using the last played playlist.

Only compatible with Shoutcast 198, Shoutcast 2, Icecast 2 & Icecast KH.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "source.restart"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10 
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

source.start

Starts the source plugin associated with a specific service using the last played playlist.

Only compatible with Shoutcast 198, Shoutcast 2, Icecast 2 & Icecast KH.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "source.start"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10 
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

source.stop

Stops the source plugin associated with a specific service.

Only compatible with Shoutcast 198, Shoutcast 2, Icecast 2 & Icecast KH.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INT The Service ID to be stopped and removed from the control panel.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "source.stop"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10 
 );  
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

source.schedule

Schedule to switch to a specified playlist at the designated time.

Only compatible with Shoutcast 198, Shoutcast 2, Icecast 2 & Icecast KH.

Limited to 50 schedules per media service.

Parameters

Parameter Options Description
auth * API Key to authenticate to control panel.
ServerID INTEGER The Service ID to be stopped and removed from the control panel.
playlist TEXT Specify a playlist to schedule.
year INTEGER Specify full year, for example 2015 or specify 0 for recurring value.
month INTEGER Specify numeric value of month, for example 01 would be January or specify 0 for recurring value.
day INTEGER Specify numeric value of day, for example 01 would be the 1st of the month or specify 0 for recurring value.
hour Specify numeric value of hour in 24 hours format, for example 16 would be equivalent to 4PM or specify 0 for recurring value.
minute Specify numeric value of minute.

PHP Sample

<?php
 require_once("../IXR_Library.php"); 
 
 $url = "http://localhost/mediacp/";
 $command = "source.schedule"; 
 $arguments = array( 
 "auth" => "VJhZdqjUWpigishesXamoVSp33WZmoxWoZ-7XJysWs6coKyd0K2Glw==", 
 "ServerID" => 10,
 "playlist" => "myplaylist",
 "year" => "2015",
 "month" => "0",
 "day" => "1",
 "hour" => "09",
 "minute" => "00"
 ); 
 
 $client = new IXR_Client($url. '/system/rpc.php'); 
 $client->debug = true; /** Set to true if you have difficulties **/ 
 
 if ( !$client->query( $command, $arguments) ) { 
 die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage()); 
 } 
 
 $return = $client->getResponse(); 
 
 if ( $return['status'] == 'success' ){ 
 echo $command. ' executed successfully.'; 
 }else{ 
 echo 'failed executing '. $command; 
 } 
 
 /** Output debugging information **/ 
 print_r( $return ); 
 
?>

Table of Contents