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.

script to create subdomains and ftp account

Discussion in 'General Discussion' started by theBassTender, Aug 1, 2005.

  1. theBassTender

    theBassTender Active Member

    Joined:
    Jan 2, 2005
    Messages:
    26
    Likes Received:
    1
    Trophy Points:
    3
    I'm in need of a way to create a subdomain and an accompanying virtual ftp account for the subdomain from a php script. Is this even possible under cPanel? Looking through the documentation, there doesn't seem to be a way to do this. Anyone have a suggestion or know of a pre-existing solution?

    t'anks.
     
  2. awibble

    awibble Member

    Joined:
    Jul 20, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Take a Look at lib cURL (php.net/curl)

    You can basically use it to login to cPanel, and goto the different pages you need to and create the accounts.

    After looking at the functions for creating accounts that cPanel provides, its exactly the same way there.

    Its not possiable to use an access key on cPanel as far as i am aware, however it can be done.

    I have used it to create directories, mail accounts, ftp accounts.

    At the moment I'm working on making a client area that uses curl to automate all cPanel functions, so that everything can be access from one account (Billing, cPanel, email etc etc)
     
  3. theBassTender

    theBassTender Active Member

    Joined:
    Jan 2, 2005
    Messages:
    26
    Likes Received:
    1
    Trophy Points:
    3
    Thanks for the reply

    Thanks for the reply - curl was my next option but I wanted to see if there was a preferred method before I did so. Thanks for the help.

    tbt
     
  4. fwwebs

    fwwebs Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    329
    Likes Received:
    0
    Trophy Points:
    16
Loading...

Share This Page