Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation



integrationblogcta.jpg

The cPanel Accounting PHP Module

The cPanel accounting PHP module provides a functional interface to the Accounting library. cPanel provides an XML-API PHP class here that should be used in place of this module.

note Note: This module requires that either curl or socket support be compiled into PHP.

ALERT! Warning: Do not use this module if you are running cPanel 11.23 or greater.

This module can be found in /usr/local/cpanel/Cpanel.

Functions

Shared Parameters

All functions within the PHP module take host, user, accesshash and usessl as the first four parameters.

  • host (string) — The host to which you will connect.
  • user (string) — The username with which to authenticate.
  • accesshash (hash) — The remote access key to use for authentication. This value should not contain newlines.
  • usessl (boolean) — Indicates whether or not to connect with SSL encryption. This requires curl support compiled into PHP.

suspend(host, user, accesshash, usessl, suspenduser )

This function suspends a user account.

Parameters

  • suspenduser (string) —The username corresponding to the account that will be suspended.

unsuspend(host, user, accesshash, usessl, unsuspenduser)

This function allows you to unsuspend a user's account.

Parameters

  • unsuspenduser (string) — The username corresponding to the account that will be unsuspended.

killacct (host, user, accesshash, usessl, username)

This function allows you to remove an account from your server.

Parameters

  • username (string) — The username to the account that will be deleted.

showversion(host, user, accesshash, usessl)

This function returns the host's cPanel version number.

listaccts (host, user, accesshash, usessl)

This function returns a list of accounts on the server

listpkgs(host, user, accesshash, usessl)

This function returns a list of packages available on the server.

Topic revision: r6 - 20 May 2011 - 14:08:14 - Main.JustinSchaefer