Reputation: 15048
I'm wondering how can I show (get) disk space usage and monthly bandwidth transfer on my website in the same way as it's shown when I login to my cPanel account. Is there an api from cPanel for this or is this a general method to do so? I'm using PHP.
Upvotes: 4
Views: 3773
Reputation: 27102
cPanel/WHM has an API which offers access to both the elements you're looking for. See the API docs for more details. The bandwidth and disk usage modules in API 1 output HTML, however API 2 has an account summary method which will return the diskused
parameter in the appropriate format (XML/JSON as requested).
Upvotes: 7
Reputation: 1016
I think those quotas should or are stored into some files somewhere on your hosting account. So all you have to do is to figure out where are those files and read them with PHP.
I am looking into this too.
Upvotes: 0