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!

Remote Access PHP Scripts

Discussion in 'General Discussion' started by ascribe, Sep 11, 2008.

  1. ascribe

    ascribe Registered

    Dec 29, 2004
    Likes Received:
    Trophy Points:
    Is it possible to write a PHP script that can read bandwidth usage for a particular virtual host? I know this must be possible because apps such as ModernBill and WHMAutoPilot read such data.

    Would I use cPanel API2 to do that? I'm not even sure if these can be used from inside an external PHP script because the documentation says that tags "can be used inside cPanel pages". What does that mean? And what is "POD" documentation? If someone could please help, I'd really appreciate it.

    BTW, I'm a PHP, MySQL, Javascript developer running a SaaS business using cPanel for each account. I have developed a web application which is a CRM (customer relationship management) and CMS (content mangement system) app. I would like to write modules inside my app which will allow users to create email accounts and do email account management without having them log into cPanel.

    I also need to write a custom billing system to bill my customers not only for their use of the web app but also for any overages in bandwidth usage. So I want to know if I can access this data via PHP from somewhere in cPanel for a particular virtual host.

    The cPanel Accounting Module for PHP is useful for creating new virtual host accounts. Would I use the XMLAPI - limitbw? If so are there examples of how to do this from PHP?

    What is the difference between WHM XML API, cPanel API1 and cPanel API2?

    thanks for your help!

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