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.

listaccts -> In readable format?

Discussion in 'General Discussion' started by Schaap, Nov 14, 2004.

  1. Schaap

    Schaap Member

    Joined:
    Oct 7, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hello people,

    I wonder if someone has ever managed to put the output of "listaccts" in a readable format. (Alias: you don't have to be a rocket scientist to understand what it means. )

    If so, could someone show me a small code example?


    Also, about the API: How do you use it? Has anyone ever used a function such as "countbandwidth"?

    I'm starting to lose hope on this field and wondering why CPanel dev. team made it if nobody can handle it?


    On the 1 zillion answers that would say: "Have you used to search function?"
    -> Yes, I did, the only things I have read was: "You might want to use the search function" or "check out http://cpanel.net/remoteaccess-php.html"

    Anyway,

    Thanks in advance!
    Ben S.
     
  2. r3n3gad3

    r3n3gad3 Member

    Joined:
    Apr 5, 2004
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Code:
    $accts = listpkgs($host,$user,$accesshash, 1); 
    
    foreach ($accts as $label => $content) { 
    echo "$label: $content<BR>\n"; 
    }
    try this one.
     
  3. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Try the api at http://whmapi.cpanelappz.com. It has very simple functions with complete examples for all functions.

    If you get in trouble just send me a mail at admin [at] cpanelappz.com and i will help you sort it out.
     

Share This Page