Jump to content

Park instead of provision a cPanel domain


makelemonade

Recommended Posts

I'm using Wordpress Multisite, and when a user orders a site, I'd like them to get a "parked" domain in the main cpanel account. Through a bit of wizardry I'll turn this into a functioning Wordpress site.

 

Is there something out there that will allow this? Or is there a module I can use as a starting point?

 

Everything I've found is about changing the number of parked domains available to a cpanel account, which isn't my goal. I need to actually park a domain when it's ordered.

Link to comment
Share on other sites

  • 2 months later...

If you are wanting to park a domain to an existing account instead of creating a new account, you would need to create your own provision module. The provision module would then need to use the cPanel api to park the domain.

 

This isn't a complete example, the module code would need to do something like this to create the parked domain:

    require_once("xmlapi.php");
    try {
      $xmlapi = new xmlapi($server['ipaddress']);
      $xmlapi->hash_auth($server['username'],$server['accesshash']);
      $xmlapi->set_output("json");
      $xmlapi->park('cPanelUsername',$params["domain"], "topdomain.com");
    }
    catch (Exception $e) {
// return error     
    }

 

https://github.com/CpanelInc/xmlapi-php

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated