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.

Whm Php Api

Discussion in 'General Discussion' started by Emil F, Feb 27, 2006.

  1. Emil F

    Emil F Registered

    Joined:
    Feb 27, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I am a reseller trying to automate all account management operations. I am trying to integrate this automation into my current website, so I'm not interested in 3rd party software such as AutoPilot. What I need is a WHM PHP API to do the following:

    - create a new account
    - upgrade a selected account
    - suspend an account

    From a quick search through this site has brought me to this (somewhat confusing) page:
    http://www.cpanel.net/remoteaccess-php.html

    Any chance the functions mentionned here are properly documented somewhere?
    Also, while there seems to be information concerning new account creations, I don't see anything that can help me with automating account upgrades. Does such a feature already exist somewhere (or is being developed)?

    Thanks for the help!

    Emil.
     
  2. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    St. Charles, MO
    We are using OptiGold for billing, and it just sends HTTP POST lines to the WHM server.

    I went to WHM and looked at the action lines for the forms like create a new account, suspend and terminate and created the appropriate HTTP line.

    Something like this:

    https://root:password@cpanel.server.com:2087/scripts/wwwacct?plan=Unix Hosting&sign=&domain=<Domain>&username=<DLogin>&password=<DPass>&quota=200&ip=&cgi=1&hasshell=1&frontpage=&maxftp=2&maxpop=10&maxlst=2&maxsql=2&maxsub=2&maxpark=2&maxaddon=0&bwlimit=10240&cpmod=x2&customip=--Auto Assign--&msel=Unix Hosting

    That will create a new account with the package: Unix Hosting

    Sending these posts using php code shouldn't be too hard to figure out.

    Chuck
     
  3. mbd5882

    mbd5882 Well-Known Member

    Joined:
    Apr 30, 2005
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Manchester, United Kingdom
    cPanel Access Level:
    Root Administrator
    use fopen and functions, Its not hard.
    Its basicly the same as the whm api scripts.
     
Loading...

Share This Page