Using the Cpanel Accounting php module

The Cpanel Accounting php module is designed to give programs that need access to create/remove/modify accounts an easy way to implement this in their php program. The general syntax for calling these functions is: function_name ($host,$user,$accesshash,$usessl,$args);

Example: createacct ($host,$user,$accesshash,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan);

For security reasons if you are connecting to a remote server you should set the usessl argument to 1. You must have the curl+ssl module installed for this to work.

Cpanel Accounting supports the following methods:

Below is a sample php program.

#!/usr/local/cpanel/3rdparty/bin/php

<?php
require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
$host = "localhost";
$user = "<USERNAME HERE>";
$accesshash = '<REMOTE ACCESS KEY HERE>';

$accts = listaccts($host,$user,$accesshash,0);
print_r($accts);
$pkgs = listpkgs($host,$user,$accesshash,0);
print_r($pkgs);

?>
			
Reseller Web Hosting Manager Contents A-M Contents N-Z
Contents N-Z
Click Here for an overview on our Web Panel
Click Here for Control Panel
Earth Web Hosting Service. Professional Hosting Plans you can count on !