The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bandwidth & Storage Accounting Functions

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

  1. comcage

    comcage Member

    Joined:
    Jul 26, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Hello, I am working on some PHP API scripts. So far so good, I was able to create a function in the Accounting.php.inc 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.
     
Loading...

Share This Page