PHP code example of kazio73 / synology-api-client

1. Go to this page and download the library: Download kazio73/synology-api-client 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/ */

    

kazio73 / synology-api-client example snippets


$synology = new FileStationClient('192.168.10.5', 5000, 'http', 1);
$synology->activateDebug();
$synology->connect('admin', 'xxxx');
print_r($synology->getAvailableApi());

$synology = new FileStationClient('192.168.10.5', 5000, 'http', 1);
$synology->activateDebug();
$synology->connect('admin', 'xxxx');
print_r($synology->getInfo('type: private || team', 'path')); 
print_r($synology->getDir('type: private || team', 'path', 'name'));