PHP Classes

WHM XML API: Manipulate Cpanel/WHM accounts using its XML API

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (4)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 70%Total: 4,642 All time: 604 This week: 59Up
Version License PHP version Categories
whm 1.0GNU General Publi...5.0PHP 5, Web services, Hosting


This class can be used to manipulate Cpanel/WHM hosting accounts using the XML Web services API.

It can establish secure HTTP connections to a Web server to manage Cpanel/WHM accounts and authenticates on behalf of a given Cpanel user.

The class can execute several types of requests:

- Retrieve the XML API version
- Retrieve the server host name
- List the active hosting accounts
- List the available packages
- Create a new account
- Retrieve a summary about an account
- Change the password of an account
- Suspend, unsuspend and terminate an account
- Upgrade or downgrade a package

Picture of Arash Hemmat
Name: Arash Hemmat <contact>
Classes: 2 packages by
Country: Iran Iran
Age: 41
All time rank: 3642 in Iran Iran
Week rank: 214 Up3 in Iran Iran Down


********** Note ************* This software is being published under GNU GPL license that means it comes with no warranty, so use at your own risk. ********* Usage ************* - You need PHP 5.x to run this class. This class is very easy to use just take a look at test.php to understand how you should use it. You must read the "WHM XML API Document" before using this class: You can see the inputs and outputs of each function in the page above. I have implemented the functions listed below, other functions will be implemented in the next version. ******List of implemented functions****** - version() - gethostname() - listaccts () - listPkgs() - createAccount($acctDomain,$acctUser,$acctPass,$acctPackg) - accountsummary($accUser) - passwd($accUser,$pass) - suspend($acctUser,$reason) - unsuspend($acctUser) - terminate($acctUser,$keepDns=0) - changepackage($accUser,$pkg) ****** FAQ ********* Q. I'm getting warning like "Warning: SimpleXMLElement::__construct()...." what is the problem? A. You did not enter the correct "username" or "whm host" or "whm hash" in the init() function and the class has not been initilized correctly. Q.I'm getting this error while creating a new account "You do not have access to create that package (package_name)!" what is the problem A.You have entered a package name that do not exist in your whm account. ******* Contact ********* Send your comments and questions to this email address: arash.hemmat _\/_at_/\_ Arash Hemmat Tuesday, September 25 2007

  Files folder image Files  
File Role Description
Accessible without login Plain text file COPYING Lic. license
Accessible without login Plain text file README Doc. documentation
Accessible without login Plain text file test.php Example example
Plain text file whm.php Class whm xml api class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:604
This week:59Up
 User Ratings  
 All time