2017 © Pedro Peláez
 

library cpanel-php-lib

cPanel PHP Library for managing WHM & cPanel from any PHP application. Easy to use. Install with Composer and start using it.

image

previewict/cpanel-php-lib

cPanel PHP Library for managing WHM & cPanel from any PHP application. Easy to use. Install with Composer and start using it.

  • Sunday, May 24, 2015
  • by shahariaazam
  • Repository
  • 2 Watchers
  • 1 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

cPanel PHP Library

cPanel PHP Library for managing WHM & cPanel from any PHP application. Easy to use. Install with Composer and start using it., (*1)

Installation

Install it via Composer bash sudo composer install, (*2)

copy and paste config.sample and rename it to config.php. Now replace all the variable in config file with your server url, root username and password., (*3)

And you are done!, (*4)

cPanel/WHM SDK Documentation

To use it you have to know the original cPanel/WHM documentation. All the commands and parameters are explained there. Based on their documentation suppose you need to call a url to get an account summery with this /json-api/accountsummary?api.version=1&user=username url., (*5)

To call that url you have to write $request->build('accountsummary', array('params' => array('user' => 'username', 'api.version' => 1))). First parameter will be command name and second parameter will hold an array where you can pass additional url parameter with array('params' => array()) params key., (*6)

Usage

To get the list of Packages from your WHM., (*7)

$request = new \CpanelPhp\Cpanel\Request(WHMURL, WHMPORT);
$response = $request->build('listpkgs')->data;
print_r($response);

Note: if you face any problem please create issue in this repository, (*8)

The Versions

24/05 2015

dev-master

9999999-dev https://github.com/previewict/cpanel-php-lib

cPanel PHP Library for managing WHM & cPanel from any PHP application. Easy to use. Install with Composer and start using it.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

php library hosting cpanel whm