资 源 简 介
A PHP library for interacting with XBMC using JSON-RPC and XBMC"s HTTP-API. Inspiration was drawn from Jason Bryant-Greene"s php-json-rpc (https://bitbucket.org/jbg/php-json-rpc/src).
First, include the xbmc.php file:
include("xbmc.php");
Next, create the two classes in the below format:
$xbmcJson = new xbmcJson("username:password@IP:Port");
$xbmcHttp = new xbmcHttp("username:password@IP:Port");
Then you can start making calls:
JSON-RPC API (http://wiki.xbmc.org/index.php?title=JSON_RPC)
Commands are sent using the following syntax:
$xbmcJson->NAMESPACE->COMMAND(array(PARAM1 => VALUE1, PARAM2 => VALUE2, etc..));
eg: $xbmcJson->VideoLibrary->GetRecentlyAddedMovies();
HTTP-API API (http://wiki.xbmc.org/index.php?title=WebServerHTTP_API)
Commands are sent using the following sy