<?php

// CPanel throws a lot of E_NOTICES...
$errorReporting = error_reporting();
error_reporting(E_ALL & ~E_NOTICE);
require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
error_reporting($errorReporting);

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


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