digitalocean php library
1.0.0
DigitalOcean PHP Library is a set of PHP classes designed to interact with the DigitalOcean API v2. The aim of this project is to create a simple library that can be included easily without an autoloader like Composer.
cURL enableddo-php-library.php and provide the DigitalOceanClient class with your access token.You will need to replace the dummy token below with your DigitalOcean API access token.
<?php
require "do-php-library.php";
$config["access_token"] = "783a8a829cafa40f75f4f71bf2a961dcdb2d63448317c512fb4d07f2dd8d1bd0";
$client = new DigitalOceanClient($config);
try {
$result = $client->Droplets->getDroplets();
} catch(Exception $e) {
die( 'Caught exception: ' . $e->getMessage() );
}
var_dump( $result );
?>