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!

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:
    151
    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:
    166
    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:
    151
    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:
    151
    Nobody have any idea?
     
  5. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    166
    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:
    156
    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;

    }
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. dhrx

    dhrx Member

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

     
  8. dhrx

    dhrx Member

    Joined:
    Jan 22, 2003
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    151
    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:
    151
    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:
    151
    Nope I can't seem to get this working

    Any ideas for total bandwidth anybody please lol

    Dan
     
Loading...

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