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.

[Q]:showing bandwidth in the homepage?

Discussion in 'cPanel Developers' started by abdoh2010, Apr 23, 2005.

  1. abdoh2010

    abdoh2010 Active Member

    Joined:
    Jan 9, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Hi
    I thook about this a lot
    When I login in my cpanel I see the Bandwidth usage and I allows wandered
    Can it show by php code in the homepage of my website?
     
  2. brentp

    brentp Well-Known Member

    Joined:
    Mar 11, 2004
    Messages:
    324
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Ayr, North Queensland, Australia
    There are ways, but they are tricky. I'd try using it via perl, it works a LOT better. Check out the cPanel API for the full listing of tags you can use to get some info outta cpanel :).

    Regards,
    Brent
     
  3. abdoh2010

    abdoh2010 Active Member

    Joined:
    Jan 9, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    :D tricky is better
    It makes me feel that I’m doing something special

    I will see the API you refer to me
     
  4. abdoh2010

    abdoh2010 Active Member

    Joined:
    Jan 9, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Hay :eek:
    It’s a wide section
    I don’t know what they are talking about there :D
    Ok I have a cpanel and whm but I am an only user for them not a developer as I saw there
    So could you guide me to the one that I need it to do the job ;)
     
  5. abdoh2010

    abdoh2010 Active Member

    Joined:
    Jan 9, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    I’m starting to read the documentation in this website and i found this
    http://cpanel.net/remoteaccess-php.html
    And
    http://www.cpanel.net/Modules-HOWTO.txt

    The first one is about php, and it is not useful to understand the story here by php

    The second one is by perl and I found in line 179
    "stats" = "View Account Statistics";

    I don’t know about this stuff but I think that it is related to what I’m searching for :D
    I will see that I can find out, but if you have any information will help me please let me know
     
  6. abdoh2010

    abdoh2010 Active Member

    Joined:
    Jan 9, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    this is what i feger out :rolleyes:
    Code:
    #!/usr/bin/perl
    BEGIN {
            push(@INC,"/usr/local/cpanel");
            push(@INC,"/usr/local/cpanel/whostmgr/docroot/cgi");
    }
    use 'whmlib';
    require 'parseform.pl';
    
    use Cpanel::Accounting;
    
    if (!($ACL{'stats'} || $ACL{'all'})) {
    	print "Sorry permission denied to remove user";
    	exit();
    }
    "stats" = "View Account Statistics";
    i know that it's not complate but this is what i can do according to my zero understanding to perl :D
     

Share This Page