Skip to content

Simple class for making requests to the WHM/cPanel API. Not affiliated with cPanel.

License

Notifications You must be signed in to change notification settings

cjrasmussen/CpanelApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CpanelApi

Simple class for making requests to the WHM/cPanel API. Not affiliated with cPanel.

Usage

use cjrasmussen\CpanelApi\CpanelApi;

$cpanel = new CpanelApi($host, $username, $token, CpanelApi::API_UAPI);

// LIST DOMAINS
$response = $cpanel->request('DomainInfo', 'list_domains');
var_dump($response);

// ADD A SUBDOMAIN TO A DOMAIN
$subdomain = [
	'domain' => 'bar',
	'rootdomain' => 'foo.com',
	'dir' => 'bar',
];
$cpanel->request('SubDomain', 'addsubdomain', $subdomain);

Installation

Simply add a dependency on cjrasmussen/cpanel-api to your composer.json file if you use Composer to manage the dependencies of your project:

composer require cjrasmussen/cpanel-api

Although it's recommended to use Composer, you can actually include the file(s) any way you want.

License

CpanelApi is MIT licensed.

About

Simple class for making requests to the WHM/cPanel API. Not affiliated with cPanel.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages