abkrim / whmapi
Package for Laravel interface with WHM Cpanel Api
Requires
- php: >=8.0
- guzzlehttp/guzzle: ^7.0.1
- illuminate/support: ~7|~8
- spatie/laravel-ray: ^1.26
- spatie/ssh: ^1.7
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.5
README
This is a package for Laravel, to work with the universe of WHM / Cpanel APIs, including calls to the UAPI. It is created for my projects, and it will grow as I require more things. It is created, like this, and although I perform my unit and feature tests, there are not all the ones I would like, nor as it should, but at least there are a series of things:
- I try to describe and facilitate the cPanel universe.
- Simplicity in the calls to certain actions.
Take a look at contributing.md to see todo list.
Installation
Composer
$ composer require abkrim/whmapi
Recomendations
- Tweak settings of server WHM/cPanel option Restrict document roots to public_htm must be Off.
Usage
Working with domains zones
cPanel does not have a method to query and get the zone of a subdomain, so a two-step operation is necessary.
- SearchDomainInfo($domain)->getgetZoneName()
- GetDNSDecode::base64decode('domain_zone'); // example: specka.ovh
{info} $domain is the main part of the URI, i.e. it can be a subdomain
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ composer update
$ vendor/bin/phpunit
Contributing
Please see contributing.md for details and a todolist.
Versions changelog
Change log of package
Security
If you discover any security related issues, please email abdelkarim.mateos@castris.com instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.