1. Go to this page and download the library: Download mfrost503/billow 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/ */
mfrost503 / billow example snippets
$dropletBody = [
'name' => 'My New Droplet',
'region' => 'nyc2',
'size' => '40gb',
'image' => 'ubuntu-14-04-x64',
'ssh_keys' => ['public key content'],
'backups' => true,
'ipv6' => true,
'private_networking' => true,
'user_data' => 'meta data to be associated with the droplet'
];
use Billow\DropletService;
$headers = ['Authorization' => 'Bearer xxxxxxxxx'];
// assuming the body of the request is the same as above
$dropletService = new DropletService();
$response = $dropletService->create($dropletBody, $headers);