Download the PHP package dutchie027/vultr without Composer

On this page you can find all versions of the php package dutchie027/vultr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vultr

vultr-php

CodeFactorPHPStan Check

PHP Library Intended to Interact with Vultr's v2 API

Installation

Usage

vultr.ini

This file drives the main configuration of the software. By default, it looks for the file in the root directory of your project using the name vultr.ini. If you want, you can give it another name and specifiy the full .ini path in the class instantiation.

The minimum Key/Value Pair in the [api] key with the TOKEN being your API token from the My Vultr Portal.

The full settings that can be supplied in the .ini are:

General Information

Class Listing

The library has the following classes:

Class Information

API

The main connection requires at minimum, an API key. You can get this by visiting My Vultr Portal -> Account -> API. In the portal, make sure you set the IP(s) you'll be calling the API from also, as by default it will lock it to the single IP you request the API from.

Once you have the API token, you can simply connect with it or you can add options

Account

Once you have a client, you can ask for the basic information about your account. NOTE: All payloads are returned in JSON, so you can choose how you want to deal with them:

Block Storage

Creating Block Storage

Config

If you call this without any $config it will still create block storage. It will use the defaults as described below.

Parameter Type Description Default Value
region string The region where you want the storage created. NOTE If you choose a location that does NOT have block storate, it will revert to the default. ewr
size integer The size (in GB) of how much storage you want created. NOTE This value must be between 10 and 10000 10
label string A text label to be associated with the storage null
Return Value

You will be returned with a JSON payload that includes the newly created Block ID as well as the cost (in dollars) and size (in GB):

Updating Block Storage

Block Storage Config

Block storage can only be updated once every 60 seconds. To update the storage you need a minimum of the blockid and either a size or new label.

Deleting Block Storage

The block ID is in the form of a GUID (something like 8692c434-08fa-4efb-a0fb-966a338aee07). If you provide a GUID that isn't in your storage container, it will fail.

Listing Specific Storage

The block ID is in the form of a GUID (something like 8692c434-08fa-4efb-a0fb-966a338aee07). If you provide a GUID that isn't in your storage container, it will fail.

Attaching Block Storage

All three values are required in the $config. The block_id is the ID of the block storage you want to attach. The instance is the instance ID of the machine you want the storage attached to. It must also be in the same location as the storage. The value live is either true or false. If it is set to true it will attach the storage but NOT restart the instance. If you set live to false it will RESTART the instance and then attach the block storage.

Detatching Block Storage

Both values are required in the $config. The block_id is the ID of the block storage you want to detatch. The value live is either true or false. If it is set to true it will attach the storage but NOT restart the instance. If you set live to false it will RESTART the instance and then detatch the block storage.

Regions

For the most part, this is a support class, but if you want to use it you can. Here's a few things you can do with it:

To-Do

Contributing

If you're having problems, spot a bug, or have a feature suggestion, file an issue. If you want, feel free to fork the package and make a pull request. This is a work in progresss as I get more info and further test the API.


All versions of vultr with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
monolog/monolog Version ^3.0
guzzlehttp/guzzle Version ^7.5
aws/aws-sdk-php Version ^3.171
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dutchie027/vultr contains the following files

Loading the files please wait ....