Creating a subdomain using WHM as an account which can be suspended later

sachintaware

Member
Jan 29, 2013
8
0
1
cPanel Access Level
Website Owner
Hello,
I am working on a PHP application which allows users to select a domain for themselves.I want to create a sub domain for each user and want it to be available in the cpanel as an account.
This is because,later if the user does not fulfill any terms or conditions,we can terminate his account till,he makes the necessary changes to meet the conditions.

I want to create the sub domain using the xml-api for WHM.Currently I use
PHP:
createacct();
to create a new domain.
Is there a function that facilitates this functionality?I should be able to call the function to create the sub domain,and it should be created as an account in WHM. Also,later I would need a function to suspend the account for any breach of rules.
Is this possible or I will have to have each user as a new account(new domain rather)?

Please provide any suggestions or pointers.Went through forum but did not get a complete solution.Most of the posts are a bit older.
Thank you for your time
 
Last edited:

sachintaware

Member
Jan 29, 2013
8
0
1
cPanel Access Level
Website Owner
Re: Creating a subdomain using WHM as an account which can be suspended lat

Hello InfoPro,thank you for the reply,I have been using the API 1 functions to some extent ,but not the rest.Going through the docs I found the AddonDomain module.But I am not sure if it would fit my exact purpose.Can you please throw some light on it? If I can use it or not?
Also,I have a question posted related to transfer of files/directories across domain here.If possible look in to it and give your valuable suggestions.
 
Last edited:

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Re: Creating a subdomain using WHM as an account which can be suspended lat

Greetings, I'm sorry but I can't help here with this sort of thing. That is, other than move your 2 threads to the Developers forum area so that the cPanel Developers can see them and comment as their forum time permits, if they wish.

Linking you to the docs is the best I can do here. Those docs hold all the answers you seek I would think.


Good luck! :)
 

sachintaware

Member
Jan 29, 2013
8
0
1
cPanel Access Level
Website Owner
Re: Creating a subdomain using WHM as an account which can be suspended lat

Thank you for moving them to the Developers area.I didn't know I had posted them at the wrong place!! :P