Results 1 to 4 of 4

Thread: accounting.php.inc

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    4

    Default accounting.php.inc

    Hello,
    can this function return other fields than domain and user?


    function listaccts ($host,$user,$accesshash,$usessl,$dom) {
    $result = whmreq("/scripts2/listaccts?nohtml=1&searchtype=domain&search=$dom&viewall=1",$host,$user,$accesshash,$usessl);
    if ($cpanelaccterr != "") { return; }

    $page = split("\n",$result);
    foreach ($page as $line) {
    list($acct,$contents) = split("=", $line);
    if ($acct != "") {
    $allc = split(",", $contents);
    $accts[$acct] = $allc;
    }
    }
    return($accts);
    }

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default

    Quote Originally Posted by Claus View Post
    Hello,
    can this function return other fields than domain and user?


    function listaccts ($host,$user,$accesshash,$usessl,$dom) {
    $result = whmreq("/scripts2/listaccts?nohtml=1&searchtype=domain&search=$dom&viewall=1",$host,$user,$accesshash,$usessl);
    if ($cpanelaccterr != "") { return; }

    $page = split("\n",$result);
    foreach ($page as $line) {
    list($acct,$contents) = split("=", $line);
    if ($acct != "") {
    $allc = split(",", $contents);
    $accts[$acct] = $allc;
    }
    }
    return($accts);
    }
    I would recommend migrating to the XML-API if you desire more robust functions: http://www.cPanel.net/plugins/xmlapi

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    4

    Default

    yes I have tried using XML-API but it is slower and harder to organize information, as I used it. I would like to see ip and disk space usage, as extra fields...

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default

    Quote Originally Posted by Claus View Post
    yes I have tried using XML-API but it is slower and harder to organize information, as I used it. I would like to see ip and disk space usage, as extra fields...
    Hmm, what language are you using to code these scripts? If PHP, specify PHP 4 or PHP 5.

    Note, the older API is no longer being actively maintained. Generally the XML-API is fast with providing responses, hence my inquiry.

Similar Threads

  1. Accounting.php.inc where to get?
    By oszone in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 11-08-2006, 05:17 AM
  2. Accounting.inc.php
    By nvez in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 07-17-2006, 05:00 PM
  3. PHP accounting
    By dhrx in forum cPanel & WHM Discussions
    Replies: 19
    Last Post: 02-26-2004, 10:49 AM
  4. Accounting.php.inc
    By nybble in forum cPanel & WHM Discussions
    Replies: 11
    Last Post: 02-13-2004, 09:51 AM
  5. Accounting.php
    By gic in forum cPanel & WHM Discussions
    Replies: 5
    Last Post: 08-05-2003, 08:55 AM