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.

Which files for this?

Discussion in 'General Discussion' started by JeremyL, Dec 30, 2001.

  1. JeremyL

    JeremyL Well-Known Member

    Joined:
    Aug 10, 2001
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    We are looking into writing a script to make it so we can give away reseller accounts with unmetered domains and instead base their accounts on bandwidth, disk space, and mybe email addy\'s and mysql databases and the other definable features in WHM.

    I see the following files.
    /var/cpanel/accts.db
    /var/cpanel/bandwidth/*

    Those can be used to show what account are owned by who and what thier bandwidrth is. But what files would let me know how much disk space each domain is using, how may email addresses, databases, and mailing lists?

    Thanks
    JL
     
  2. JeremyL

    JeremyL Well-Known Member

    Joined:
    Aug 10, 2001
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    OK maybe this should have been posted in the API section.

    So as far as how the script would work. It would read \"/var/cpanel/accts.db\" and each account would be categoried by who owns it (either root or the reseller user name).

    Then it would take each reseller and add up the variables using the API tags to comapre to what we set as the limits and let us know of any high percentages or overages.

    I found these API tags to work with:
    $\"countbandwidth\"
    $\"showbandwidth\"
    $\"showquotaused\"
    $\"countdbs\"
    $\"countlists\"
    $\"countpops\"

    I only have a couple of questions. the first is about these two tags.
    $\"countbandwidth\"
    $\"showbandwidth\"
    Which one shows the amount of bandwidth already used?

    The second is, can these API tags be pulled and used by PHP or Perl in any script? Or do these have to be embedded in the Cpanel or WHM pages to work? In other words would they work in a script executed from any directory with any user/group permissions?

    Thanks
     
  3. JeremyL

    JeremyL Well-Known Member

    Joined:
    Aug 10, 2001
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
  4. bdraco

    bdraco Guest

    JeremyL,

    Please email me a good phone # I can call you on so you can explain this in more detail to me ... Also let me know how late is too late to call and your TimeZone
     
Loading...

Share This Page