2012-12-24, 11:11
Hi,
Im tring to control xbmc from php(to create some basicl functionality) and noticed the API docs are not complete
I basicly try to connect from a JSON-RPC wrapper but i get params array issues when there is no explanation regarding the vectors passed to the API
my code is:
require_once 'TCPClient.php';
$params = array
(
'host' => '192.168.1.102',
'port' => 9090,
'user' => 'xbmc',
'pass' => 'password'
);
try
{
$rpc = new XBMC_RPC_TCPClient($params);
} catch (XBMC_RPC_ConnectionException $e) {
die($e->getMessage());
}
when i run command that dont need args its ok aka
$response = $rpc->Application->Quit();
works
but this doesnt
$response = $rpc->Player->Open(array("name" => "/media/test/ANYTHING_ELSE/VIDEO_TS/VIDEO_TS.VOB"));
tried also
$response = $rpc->Player->PlayPause(array(array("playerid" => 0), array("id" => 1)));
and all sort of passing arrays but no luck
Any help would be apruciated.
Tnx,
Im tring to control xbmc from php(to create some basicl functionality) and noticed the API docs are not complete
I basicly try to connect from a JSON-RPC wrapper but i get params array issues when there is no explanation regarding the vectors passed to the API
my code is:
require_once 'TCPClient.php';
$params = array
(
'host' => '192.168.1.102',
'port' => 9090,
'user' => 'xbmc',
'pass' => 'password'
);
try
{
$rpc = new XBMC_RPC_TCPClient($params);
} catch (XBMC_RPC_ConnectionException $e) {
die($e->getMessage());
}
when i run command that dont need args its ok aka
$response = $rpc->Application->Quit();
works
but this doesnt
$response = $rpc->Player->Open(array("name" => "/media/test/ANYTHING_ELSE/VIDEO_TS/VIDEO_TS.VOB"));
tried also
$response = $rpc->Player->PlayPause(array(array("playerid" => 0), array("id" => 1)));
and all sort of passing arrays but no luck
Any help would be apruciated.
Tnx,