Using the Cpanel Accounting PHP module

The Cpanel Accounting PHP module is designed to give applications that use PHP an easy way of manipulating accounts. 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);

If you are connecting to a remote server you need to set the usessl varible to 1. This module requires the curl+ssl PHP module to be installed.

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);

?>
			

Home to Small business web hosting | Home to inexpensive web hosting | Web hosting India | Compare php web hosting | Upgradable web hosting | Internet Domain names registration | A step by step guide for domain web hosting | How to choose right web hosting package | Guide to Budget Web hosting and Domain names
Scam alert: There is no such thing as free domain names or free web hosting


Web Hosting Bangalore | Web Hosting Delhi | Web Hosting Mumbai | Web Hosting Chennai | Web Hosting Pune | Web Hosting Kolkata | Web Hosting Hyderabad | Web Hosting Kerala | Web Hosting India

@Copyright ADPS Software Solutions Private Limited.
One of the best web hosting companies in India
>