blackpanda / virtualizor
Virtualizor API wrapper
Requires
- php: ^7.3|^8.0
- ext-curl: *
- ext-json: *
README
A PHP package for interacting with Virtualizor's API, providing a simple and efficient way to manage your Virtual Private Servers (VPS), IP pools, storage, and more.
Table of Contents
Installation
You can install the package via Composer. Run the following command in your terminal:
composer require blackpanda/virtualizor
Usage
To get started with the Virtualizor package, include it in your PHP script and initialize it with your API credentials.
require 'vendor/autoload.php'; use BlackPanda\Virtualizor\Virtualizor; // Initialize the Virtualizor client $virtualizor = new Virtualizor('your_ip', 'your_port', 'your_api_key', 'your_api_secret'); // Example: Fetch VPSes $vpsList = $virtualizor->getVPSes(); print_r($vpsList);
Features
- Fetch and manage Virtual Private Servers (VPS)
- Manage IP pools
- Manage storage resources
- Start, stop, and restart VPS instances
- Support for various server actions
Methods
The following methods are available in the package:
getVPSes(): Retrieve a list of all VPS instances.
createVPS(): Create a new VPS instance.
deleteVPS(): Delete a VPS instance.
start(): Start a VPS instance.
stop(): Stop a VPS instance.
suspend(): Suspend a VPS instance.
resume(): Resume a suspended VPS instance.
getVPSesStatus(): Retrieve the status of all VPS instances.
For more details on each method, please refer to the code documentation.
Contributing
Contributions are welcome! If you have suggestions for improvements or find a bug, please open an issue or submit a pull request.
Steps to Contribute:
- Fork the repository.
- Create a new branch (git checkout -b feature/YourFeature).
- Make your changes and commit them (git commit -m 'Add some feature').
- Push to the branch (git push origin feature/YourFeature).
- Open a pull request.
License
This package is licensed under the MIT License. See the LICENSE file for more information. Author
This package is maintained by B14ckP4nd4.