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.

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

Discussion in 'cPanel Developers' started by sachintaware, Jan 30, 2013.

  1. sachintaware

    sachintaware Member

    Joined:
    Jan 29, 2013
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    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
     
    #1 sachintaware, Jan 30, 2013
    Last edited: Jan 30, 2013
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. sachintaware

    sachintaware Member

    Joined:
    Jan 29, 2013
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    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.
     
    #3 sachintaware, Jan 30, 2013
    Last edited: Jan 30, 2013
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    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! :)
     
  5. sachintaware

    sachintaware Member

    Joined:
    Jan 29, 2013
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    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
     
Loading...

Share This Page