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.

PHP Accounting - Bandwidth

Discussion in 'General Discussion' started by dhrx, Mar 12, 2004.

  1. dhrx

    dhrx Member

    Joined:
    Jan 22, 2003
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Hi

    Does anybody know how to get total bandwidth for the server in question using PHP using the accounting module. If so please share and help a guy out. As I can not see how to just get the total bandwidth.

    Thanks!

    Dan
     
  2. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    I don't really understand the question.

    Are you talking about getting the bandwith usage for individual accounts?
     
  3. dhrx

    dhrx Member

    Joined:
    Jan 22, 2003
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Sorry yes and no

    What I would like to know is how to via the accounting module add something so I can request bandwidth for individual accounts and the total for the server via php

    Thanks

     
  4. dhrx

    dhrx Member

    Joined:
    Jan 22, 2003
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Nobody have any idea?
     
  5. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    There is a feature like that built into WHM but other than that, you prolly won't get an answer here.
     
  6. phpman

    phpman Well-Known Member

    Joined:
    Sep 3, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Rio de Janeiro - Brazil
    Your need use this function:

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

    }
     
  7. dhrx

    dhrx Member

    Joined:
    Jan 22, 2003
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Thanks alot, wish I could find these easier

     
  8. dhrx

    dhrx Member

    Joined:
    Jan 22, 2003
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Can anybody else get this to work?

    It doesnt seem to return me anything
     
  9. dhrx

    dhrx Member

    Joined:
    Jan 22, 2003
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Got it working but it gives me everything I would like just the main total

    Any Ideas?

    Dan
     
  10. dhrx

    dhrx Member

    Joined:
    Jan 22, 2003
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    Nope I can't seem to get this working

    Any ideas for total bandwidth anybody please lol

    Dan
     
Loading...

Share This Page