Hello,
We are working to a PHP API Class for WHM and cPanel.
We are going to include all functions.
Structure will be something like:
WHM.php => main class
Account.php => accounting class
Reseller.php => reseller class
Dns.php => dns class
Ssl.php => ssl class
Package.php => package class
Serverinfo.php => server information class
Serveradmin.php => server administration class
================================================
An example of use:
We need to call only WHM.php
$config['whm_user'] = 'user_here';
$config['whm_user'] = 'url_here';
$config['whm_hash'] = 'hash_generated_from_whm';
$whm = new WHM('account' , $config);
first parameter 'account' is the action.
you need to create a dns? just replace is with "dns"
creating an account;
$prepare = $whm->do->createacct('user','domain','email',$extraoption s)
$extraoptions is array (ex

;
$extraoptions['plan'] = 'planname';
$extraoptions['reseller'] = '1';
$prepare is the query string;
to finish the account creation you will only need to run
$result = $whm->exec($prepare);
Where the $result is the array of xml response
example to view the status
echo $result['status'];
================================================== ====
All functions names will be as WHM
"createacct,listaccts,modifyacc,addzonerecord, etc"
Any ideas are welcome