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.

Cpanel Plugin Creation Help

Discussion in 'cPanel Developers' started by varunms, Dec 14, 2012.

  1. varunms

    varunms Active Member

    Joined:
    Aug 29, 2010
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    INDIA
    cPanel Access Level:
    Root Administrator
    Hi too all

    i am currently developing a cpanel plugin

    i need diskusage , disklimit bandwidthusage & bandwidthlimit for the account that have logged in to the cpanel

    how to get those values from cpanel stats bar in left side
     
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You can get account's usage info from the API2 StatsBar::stat call. IIRC, the account limit information is available in the global cPanel hash...if you're using PHP, you can look at the CP-PHP test file /usr/local/cpanel/base/frontend/x3/test.php for an example on how to do the loadvar() call
    Code:
    <cpanel PHP="loadvars()">
    
    and then have access to $_CPANEL
    Code:
    echo "CPANEL VARS:";
    var_dump($_CPANEL);
    
     
  3. varunms

    varunms Active Member

    Joined:
    Aug 29, 2010
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    INDIA
    cPanel Access Level:
    Root Administrator
    ok any way i have used stats module to get can i know how i can create a file like install.sh
     
Loading...

Share This Page