Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

automatic cpanel account creation with php

Discussion in 'General Discussion' started by grumble, Aug 17, 2005.

  1. grumble

    grumble Registered

    Aug 17, 2005
    Likes Received:
    Trophy Points:
    hi everyone,
    Ive just recently signed up for a reseller account, that came with WHM. My host gave whmautopilot away for free, So I tried that, hated it and decided to create new accounts via php instead. Ive finished reading Cpanels accounting php module, and it wasnt very easy to understand( huge understatement).

    What I want to do (create accounts) I understood to be something like this--

    require '/usr/local/cpanel/Cpanel/';
    $host = "localhost";
    $user = "me";
    $accesshash = '';

    if ($newaccount=createacct ($host,$user,$accesshash,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan))
    { print "new account created";}

    however Ive read some posts saying that for createacct the variables are not in the correct order. Also that $acctuser cant have numbers in it etc.

    Does accesshash stand for that really long whm key? Can someone walk me through the variables, telling me what each one stands for? and any limitations etc, and most importantly the correct format eg. for $acctdomain is it or just thanks for your help! :D

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice