PHP Classes
elePHPant
Icontem

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    
Last Updated Ratings Unique User Downloads Download Rankings
2008-11-05 (10 years ago) RSS 2.0 feedStarStarStarStar 73%Total: 4,591 All time: 604 This week: 382Up
Version License PHP version Categories
whm 1.0GNU General Publi...5.0PHP 5, Web services, Hosting
Description Author

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

Name: Arash Hemmat <contact>
Classes: 2 packages by
Country: Iran Iran
Age: 36
All time rank: 3691 in Iran Iran
Week rank: 276 Up4 in Iran Iran Down

Details
********** 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: 
http://www.cpanel.net/plugins/xmlapi/index.html
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_/\_  gmail.com


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  
 0%
Total:4,591
This week:0
All time:604
This week:382Up
 User Ratings  
 
 All time
Utility:95%StarStarStarStarStar
Consistency:92%StarStarStarStarStar
Documentation:77%StarStarStarStar
Examples:87%StarStarStarStarStar
Tests:-
Videos:-
Overall:73%StarStarStarStar
Rank:221