PHP code example of macromindonline / vultr-api-client

1. Go to this page and download the library: Download macromindonline/vultr-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/ */

    

macromindonline / vultr-api-client example snippets




use Vultr\VultrClient;
use Vultr\Adapter\GuzzleHttpAdapter;

// Using Guzzle 5 or 6...
$client = new VultrClient(
    new GuzzleHttpAdapter('your-api-key')
);

$result = $client->metaData()->getAccountInfo();

var_export($result);



use Vultr\VultrClient;
use Vultr\Adapter\CurlAdapter;

// Using regular CURL, courtesy of 'usefulz'
$client = new VultrClient(
    new CurlAdapter('your-api-key')
);

$result = $client->metaData()->getAccountInfo();

var_export($result);