<?php require 'vendor/autoload.php'; use LinkORB\Vultr\Vultr; function printReplyIfError($api, $res) { if ($res === false) { echo $api->code . "\n"; echo $api->reply . "\n"; } } $vultrApi = new Vultr("PUT_YOUR_API_KEY_HERE"); $api = $vultrApi->authApi(); $res = $api->info(); var_dump($res); printReplyIfError($api, $res);
var_dump($res); printReplyIfError($server, $res); echo "------------- reverseListIpv6(" . $k . ") --------------\n"; $res = $server->reverseListIpv6($k); var_dump($res); printReplyIfError($server, $res); echo "------------- neighbors(" . $k . ") --------------\n"; $res = $server->neighbors($k); var_dump($res); printReplyIfError($server, $res); echo "------------- getUserData(" . $k . ") --------------\n"; $res = $server->getUserData($k); var_dump($res); printReplyIfError($server, $res); echo "------------- bandwidth(" . $k . ") --------------\n"; $res = $server->bandwidth($k); var_dump($res); printReplyIfError($server, $res); } /*echo "------------- reboot(".$k.") --------------\n" ; $res = $server->reboot(PUT_SERVER_ID_HERE) ; var_dump($res) ; exit(0) ;*/ /*$res = $server->create(1, 29, 127) ; var_dump($res) ; echo $server->code."\n" ; echo $server->reply."\n" ;*/ /*$res = $server->destroy(PUT_SERVER_ID_HERE) ; var_dump($res) ; echo $server->code."\n" ; echo $server->reply."\n" ;*/