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.

Account Creation Scripts

Discussion in 'General Discussion' started by released, May 13, 2007.

  1. released

    released Registered

    Joined:
    May 13, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I recently purchased a reseller's account using cPanel. I need to automate account creation, but the cPanel website didn't have enough information for me. Here is the basic script I am working with , not sure if this all I need to create an account. I have a few questions...

    // Not familiar with this first line, #! means what? Is this basically telling PHP where the PHP cPanel module is located? I checked my account and couldn't find this in my directory, what do I need to install this module?
    #!/usr/local/cpanel/3rdparty/bin/php
    // Is this require file part of the module?
    require '/usr/local/cpanel/Cpanel/Accounting.php.inc';

    // Should I keep $host as localhost if the account is being created from a script within my account? If I sign up remotely, should I enter the full http address?
    $host = "localhost";
    // Is user my username I use to access my reseller's account?
    $user = "";
    //$accesshash and $usessl is unfamiliar to me, could you please explain this to me?
    $accesshash = '';
    $usessl= "";
    // $acctdomain will be posted from the signup form. However, considering the client may not already have this domain, what will the address to the site be?
    $acctdomain= "";
    $acctuser= "";
    $acctpass= "";
    // Should $acctplan just be the string for my package, such as "released_Basic"?
    $acctplan= "";

    $accountSetup = createacct($host,$user,$accesshash,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan);

    My main concern is just having the correct module and scripts installed allowing me to create account scripts. My second biggest concern is the $accesshash and $usessl. I am not familiar with Secured Socket Layer, and I am assuming this is what I use for the Remote Access Key from my WHM.

    Any help will be greatly appreciated.
    Jesse
     
  2. smallhost

    smallhost Registered

    Joined:
    Mar 7, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    What !

    $accountSetup = createacct($host,$user,$accesshash,$usessl,$acctdo main,$acctuser,$acctpass,$acctplan); => this line have a error
    Code:
    Parse error: syntax error, unexpected T_STRING in /home/pro24h/public_html/whm.php on line 21
    
     
  3. viraj

    viraj Well-Known Member

    Joined:
    Sep 28, 2006
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Twitter:
Loading...

Share This Page