127.0.0.1 G. G0001
P. P0023
1 — Confirms that you agree to the conditions listed above.
0 — Represents that you do not agree to the conditions listed above.
1 — Results in the a forced licensing.
0 — The new license will not be forced upon the specified IP address.
0001
1 — The license has been successfully added.
0 — The license has not been added.
-1 — The license has not been added because you entered invalid input data.
1 — The license that has been added is a yearly license.
0 — The license that has been added is not a year license.
http://manage2.cpanel.net/XMLlicenseAdd.cgi?legal=1&groupid=G0001&packageid=P001&force=0&ip=127.0.0.1 in a web browser will produce XML output similar to the following:
Calling the function using the URL above will return XML data by default. To change the output format that will be returned, use either of the following URLs:<XMLlicenseAdd licenseid="0001" promoinfo="eligible, but no promotions are active on your account..." reason="OK" status="1" version="0.4" yearly="0"/>
http://manage2.cpanel.net/XMLlicenseAdd.cgi?output=json&legal=1&groupid=G0001&packageid=P001&force=0&ip=127.0.0.1
http://manage2.cpanel.net/XMLlicenseAdd.cgi?output=yaml&legal=1&groupid=G0001&packageid=P001&force=0&ip=127.0.0.1
XMLlicenseAdd.cgi. You can use this module to pass input variables to a Manage2 API function. You will need to edit the example below to suit your needs.
use cPanelLicensing;
my $cpl = cPanelLicensing->new(user => $user, pass => $pass);
$cpl-> activateLicense(
groupid=>$groupid
packageid=>$packageid
ip=>$ip
force=>$force
)
In the example above: $ip — The IP address of the server being provisioned a new license.
$groupid — The ID of the group to which the new license will belong.
$packageid — The ID of the package that the new license will use.
$force — Specifies whether the creation of the new account should be forced. $force is an optional variable.
<?php
include("cpl.inc.php");
$cpl = new cPanelLicensing("__USERNAME__","__PASSWORD__");
$lisc = $cpl->activateLicense(array(
"ip" => $ip,
"groupid" => $groupid,
"package" => $packageid,
"force" => $force
)
);
?>
In the example above: $ip — The IP address of the server being provisioned a new license.
$groupid — The ID of the group to which the new license will belong.
$packageid — The ID of the package that the new license will use.
$force — Specifies whether the creation of the new account should be forced.
__USERNAME__ and __PASSWORD__ are meant to represent the username and password for your Manage2 account.
You can learn more about using a PHP class to call API functions.
Copyright © cPanel 2000–2011.