script to create subdomains and ftp account

theBassTender

Active Member
Jan 2, 2005
26
1
153
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.
 

awibble

Member
Jul 20, 2004
22
0
151
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)
 

theBassTender

Active Member
Jan 2, 2005
26
1
153
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