<?php

//change the following path if you have moved the Accounting.php.inc file into your home dir path
$accountingPath = "/usr/local/cpanel/Cpanel/Accounting.php.inc";

// CPanel throws a lot of E_NOTICES...
$errorReporting = error_reporting();
error_reporting(E_ALL & ~E_NOTICE);

//do not change anything below here unless you know what you are doing
if (@is_file($accountingPath)) {
    require_once $accountingPath;
} else {
    require_once dirname(__FILE__).'/Accounting.php.inc';
}

$host = "hostname.servername.com";
$user = "user";
$usessl = "0";  //0 for no, 1 for yes
$accesshash = 'enter your whm access hash here';


$response = listpkgs ($host,$user,$accesshash,$usessl);

error_reporting($errorReporting);

echo "<pre>";
print_r($response);
echo "</pre>";

?>
