JeremyL

Well-Known Member
Aug 10, 2001
87
0
306
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
 

JeremyL

Well-Known Member
Aug 10, 2001
87
0
306
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
 
B

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