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 Accounting -- Perl Question

Discussion in 'General Discussion' started by LightForce, Jun 7, 2003.

  1. LightForce

    LightForce Registered

    Joined:
    Jun 1, 2003
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Anyone know if there is a way to access specific eliments of a package via the Perl Accounting module?

    More specifically, I would like to be able to export the details of a given package such as bandwidth, quota, e-mail restrictions etc.

    I was able to list my accounts, but I was not able to extract details about each account.


    Thanks for your help!!!!

    cPanel.net Support Ticket Number:
     
  2. geomir

    geomir Member

    Joined:
    Mar 17, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    #data taken from list accounts
    my $account_name="blabla";
    my $package_for_account="blablapackage";

    #GET PACKAGES DATA
    my %PKGS=$whm->listpkgs();

    foreach my $pkg(keys %PKGS)
    {

    #THE FOLLOWING ARRAY CONTAINTS ALL THE INFO ABOUT #THE PACKAGE

    # @{$PKGS{$pkg}}

    }

    #P.S. the same way you get all the info for an account, the only difference is that you list accounts.
     
Loading...

Share This Page