PHP code example of bschleyer / php-api-sdk
1. Go to this page and download the library: Download bschleyer/php-api-sdk 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/ */
bschleyer / php-api-sdk example snippets
bash
composer
php
$dsClient = new dashservApiClient("5srzVAPT0Kz0CME0Y5GTOfha4TKDC1rD");
foreach ($dsClient->vServer()->list()->getData() as $vserverItem) {
// UUID: dIjw5 - Name: test (2 Kerne, 4 GB RAM, 60 GB SSD)
echo "UUID: {$vserverItem->uuid} - Name: {$vserverItem->name} ({$vserverItem->options->cores} Kerne, {$vserverItem->options->ram} GB RAM, {$vserverItem->options->disk} GB SSD)\n";
}