Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Bandwidth & Storage Accounting Functions

Discussion in 'General Discussion' started by comcage, Jul 24, 2005.

  1. comcage

    comcage Member

    Jul 26, 2003
    Likes Received:
    Trophy Points:
    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.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice