Bandwidth & Storage Accounting Functions


Jul 26, 2003
Hello, I am working on some PHP API scripts. So far so good, I was able to create a function in the file to do things in php that aren't listed on your site such as upgrading/downgrading an account, changing a password for a users account and what not.

However, I now want to do two things and I can't find much support on it anywhere. I want to get JUST the number for the total bandwidth usage. I added the following function but it displays all of the accounts, dispalys etc, and I just want the number for total bandwidth usage:

function view_bandwidth ($host,$user,$accesshash,$usessl) {
$result = whmreq("/scripts/showbw",$host,$user,$accesshash,$usessl);
if ($cpanelaccterr != "") { return; }
return $result;

I also want to do the same thing for individual account usage, individual storage usage, and total storage usage.

If you can shead some light on the support of me being able to add this into my API that would be greately appreciated. Thank you in advance.