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.

Accounting php module

Discussion in 'General Discussion' started by strauberry, Apr 13, 2003.

  1. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi guys,

    is it possible to create an account with php automatically?
    Yes, it is.

    But how can I state the max-ftp accounts or max databases??

    It is impossible for me to handle this issue with packages because every customer has different and individual figures so I'd have to create a package for every customer.

    I'm searching for a solution like this one:

    createacc(....,$max_mail, $max_ftp, $skin, ...) It would be also ok to handle the data with an array or something...

    Thank you so much!!!

    Strauberry
     
  2. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    nobody???

    S**T
     
  3. SoftmegUK

    SoftmegUK Well-Known Member

    Joined:
    Feb 13, 2002
    Messages:
    372
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    There have been some modifications to the accounting php module to do various things, i dont see why you cant change it to do what you want... do a searcg on the forum.
     
  4. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    before I post a message I always search the forum!

    Ok then, I have to find my own way to handle (again :( )

    Thank you!
    strauberry
     
  5. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
  6. SoftmegUK

    SoftmegUK Well-Known Member

    Joined:
    Feb 13, 2002
    Messages:
    372
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    Try adding something like this to your accounting.php.inc on your server (but put all the bits you want in!):


    function createcustom ($host,$user,$accesshash,$lotsofvars,$morevars) {
    $result = whmreq("/scripts/wwwacct?var=${var}",$host,$user,$accesshash,$usessl);
    if ($cpanelaccterr != "") { return; }
    return $result;
    }
     
    #6 SoftmegUK, Apr 14, 2003
    Last edited: Apr 14, 2003
  7. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,
    thank you for your answers, they look quite good!

    Now there's another problem! The simplest example doesn't work :( I found various posting concerning this issue but there aren't any answers :)
    I use the example from the doc on the cpanel-website but there is no output :(

    PHP:
    require '/usr/local/cpanel/Cpanel/Accounting.php.inc';


       
    $host "IP-Adresse";
       
    $user "root";
       
    $accesshash 'HASH';

       
    $accts listaccts($host,$user,$accesshash,1);
       
    print_r($accts);
       
    $pkgs listpkgs($host,$user,$accesshash,1);
       
    print_r($pkgs);
    Thank you so much again!

    Best regards
    Strauberry
     
  8. SoftmegUK

    SoftmegUK Well-Known Member

    Joined:
    Feb 13, 2002
    Messages:
    372
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    Do you have curl support on your server?
     
  9. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    yes curl is installed and I think that the curl should support the accounting.

    Thank you!
    strauberry
     
Loading...

Share This Page