PHP code example of fozzyhosting / winvps-php-client
1. Go to this page and download the library: Download fozzyhosting/winvps-php-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/ */
fozzyhosting / winvps-php-client example snippets
use Fozzy\WinVPS\Api\Client;
// Create API client
$client = Client::make('api-key');
// Returns list of all templates available for new machines
$templates = $client->templates()->list();
// View single Job details
$jobDetails = $client->jobs()->getById($jobId);
// Send single command which does not need additional options
$jobs = $client->machines()->sendCommandByName($machineName, 'restart');