PHP code example of chindit / plex-api
1. Go to this page and download the library: Download chindit/plex-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
chindit / plex-api example snippets
$plex = new Chindit\PlexServer('http://path.to.my.plex', 'MyPlexToken');
$plex = new Chindit\PlexServer('http://path.to.my.plex', 'MyPlexToken', 32400, ['timeout' => 10]);
$myLibraries = $plexServer->libraries();
$theLibraryIWant = $myLibraries[0]; // Choose any libray you want;
$myMedias = $plexServer->library($theLibraryIWant->getId());