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.

Remote Account Creation With PHP

Discussion in 'General Discussion' started by armega, Jul 13, 2004.

  1. armega

    armega Member

    Joined:
    Jul 12, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I have no access to the '/usr/local/cpanel/Cpanel/Accounting.php.inc' file... I actually want to develope a PHP script to remote add accounts. It seems that all the docs assume that you have root access to the server (which I don't) or at best are going to be using that server to host the script to auto create the account. I have two servers...

    ServerOne :
    - all my user accounts
    - cpanel access
    - no root access
    - webserver
    - email server

    ServerTwo :
    - root access
    - webserver

    I would like to take ServerTwo and have a script for users to sign up on it. Then that script send the account creation request to ServerOne (with the encription key) and let my user create the account basicly.. All they would choose is there username and pass.. if its not taken then I would create the account etc..

    Any ideas how I might go about this? I have sceen the 'Accounting.php.inc' file and have it.. But it references other files on the server in that area ofcorse.. makeing the script useless.. for example..
    '$result = whmreq("/scripts/remote_suspend?user=${suspenduser}",$host,$user,$accesshash,$usessl);'

    Thanks,
    Armega
     
  2. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Are you a reseller on Server One?
     
  3. armega

    armega Member

    Joined:
    Jul 12, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    yes I am :)
     
  4. fwwebs

    fwwebs Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    329
    Likes Received:
    0
    Trophy Points:
    16
    Go into your WHM on the server and to the account creation form and look at where the form will post to. Substitute those for the variable in the script you've started and that should work. You must have the outbound port open on the sending server, for the request to be processed in the receiving server.
     
  5. armega

    armega Member

    Joined:
    Jul 12, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    The form had the following action: <form action="/scripts/wwwacct" name="mainform">


    How can I use this to do any kind of remote administration????

    Thanks in advance
     
Loading...

Share This Page