logo
About Us Hosting Servers Docs Login





Dedicated Server License Provisioning Code Explained

Primarily, you'll need to configure the server to use the licensing API. GO into Manage2 and dowload the API Guide under Automation to find the pre-requisites and installation instructions.

After the API code is installed, we need to make sure we're using that code:.

Then, we need to grab the data that we are passing from our form (Noting the data will be different depending on what you ask for in the HTML):

You'll want to do a lot of verification to check things like whether or not the user exists in your system, whether their credit card number is good, etc. Those functions will be specific to your billing solution and we've simply included dummy functions for those items.

You'll want to take note of the issueLicense function:

We can easily connect to the license server with our Manage2 username and password:

issueLicense uses the following code to issue a license for the ip address passed to it:

You'll notice that a groupid and packageid are specified. You can find the groups and packages you have available with this code:

The rest of the picture is the HTML form used to gather the data passed to your script. Here's the form. Simply replace the following code with whichever values you need to collect and change the cgi params above accordingly:

Finally, some JavaScript is used to make sure the user isn't submitting a blank form. You'll definitely want to add some specific JavaScript to validate the information you are looking for from the form:



Home   |    About us   |    Hosting   |    Servers   |    Docs   |    Login

MyBrandedHOST.com © 2007.  cPanel is a registered trademark of cPanel, Inc.