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

Discussion in 'General Discussion' started by marcos, Feb 25, 2003.

  1. marcos

    marcos Member

    Joined:
    Feb 24, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    brazil
    I ´m new in this area, and i´d like to know where i can put a account creation scripts?Could be a www directory? I have a reseller account and i´d like thay my buddy could create account too, but i ´dont want give him my password.

    Does some one could help me?
     
  2. jimcarter

    jimcarter Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    Hi,
    This may take a bit of coding but the only thing you can do besides give him your password is to setup an account creation area,
    if you take a look at this documentation here:
    http://www.cpanel.net/manual/remoteaccess-php.html
    You could submit the variables $acctuser, $acctpass and $acctplan from a html form which would enable him to create an account with the details needed,
    only problem would be that a plan would already need to be created with the specs that suit him,
    the more features you require, the more coding it takes,
    if you spend time on it though, you can come up with a really cool system, I recently finished coding a system allowing my resellers to create reseller accounts of their own through a small separate control panel,
    works very nice :D
     
  3. marcos

    marcos Member

    Joined:
    Feb 24, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    brazil
    i need this !!!

    Thanks Jim, i follow the example in cpanel.net to create account, but the script doesn´t return anithing. I put this script in www directory and the plan i have ever configurated in WHM. When i run a script, after i reload my list plain from whm , but doesn´t work.

    supose this script is create.php


    PHP:--------------------------------------------------------------------------------
    require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
    $host = "localhost";
    $user = "user";
    $accesshash = 'ACCESSHASH';
    $usessl = "1";
    $do = createacct($host,$user,$accesshash,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan);
    if (!eregi("wwwacct creation finished",$do)){
    echo "There has been a problem with your account creation!<br>Please contact support for help!";
    }
    else
    {
    Header("Location: success.html");
    }

    i call this manner

    www.mydomain.com/create.php

    is all right?


    see you


    Marcos
     
  4. jimcarter

    jimcarter Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    Yes that would be the correct way to call that script,
    you should make sure that you have entered all the variables correctly, if you do not have curl for php installed change the usessl variable to 0
    i.e. $usessl = 0;
    make sure that you have entered your accesshash correctly also,
    Thanks
     
  5. marcos

    marcos Member

    Joined:
    Feb 24, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    brazil
    socket

    I tried to use a create account script but
    I ´m having problem with socket_create() function , that´s a not definied function. How can i solve this.

    Thank´s


    Marcos
     
  6. marcos

    marcos Member

    Joined:
    Feb 24, 2003
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    brazil
    thank´s so much

    My problem is socket. PHP have a problem because socket is not stable. i run phpinfo() and sockets are enable but is not truth()!!!

    I run the script from the other host and had success!

    Thank´s Jim because i didn´t have curl() but this is only necessary if you use usessl=1 .This information is very important because Cpanel.net only say that you need curl() but socket can work very well :)
     
Loading...

Share This Page