PHP Library for Plex HTTP Control API

Hey eliabeandrade, sorry for the late reply. I'll try to put something together to better help you. I'll PM you, so we can keep the noise out of this thread.

ok

I get this:
 
I created a idex.php containing:
 

<?php

 
require_once('Plex.php');
 
// Then you can pretty much follow the README
 
$servers = array(
    'name-of-server' => array(
        'address' => '127.0.0.1'
    )
);
 
$plex = new Plex();
$plex->registerServers($servers);
 
$server = $plex->getServer('ServerPlex');
?>
 
But this returns me the following error
 

Fatal error: Uncaught exception 'Plex_Exception_Server' with message 'The server "ServerPlex" can not be found.' in C:\xampp\htdocs\plex3\Plex.php:174 Stack trace: #0 C:\xampp\htdocs\plex3\index.php(24): Plex->getServer('ServerPlex') #1 {main} thrown inC:\xampp\htdocs\plex3\Plex.php on line 174

 
peopl help to those who have managed to configure

peopl help please

Hey eliabeandrade,

Sorry I've been a bit absent lately. Instead of this:

$servers = array(
    'name-of-server' => array(
        'address' => '127.0.0.1'
    )
);

Try this

$servers = array(
    'ServerPlex' => array(
        'address' => '127.0.0.1'
    )
);

Also make sure that SeverPlex is the correct name of the server. Is this the name that shows up at the top right of the screen when you use the standard Plex client? Also, it looks as if you are running your PHP on the same machine you are running Plex Server. Is this correct?

Hi guys,

I'm getting this error: 

Strict Standards: Declaration of Plex_Server_Library_ItemAbstract::getPolymorphicItem() should be compatible with Plex_Server_Library_SectionAbstract::getPolymorphicItem($polymorphicData, $scopedToItem = false) in /path/to/php-plex/Server/Library/ItemAbstract.php on line 41

Any idea why?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.