Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function transfers an existing license.

Examples 


 Browser-based Calls
XML
https://manage2.cpanel.net/XMLtransfer.cgi?oldip=127.0.0.1;newip=192.168.0.1;packageid=008;force=1;dryrun=0
JSON
https://manage2.cpanel.net/XMLtransfer.cgi?output=json&oldip=127.0.0.1;newip=192.168.0.1;packageid=008;force=1;dryrun=0
YAML
https://manage2.cpanel.net/XMLtransfer.cgi?output=yaml&oldip=127.0.0.1;newip=192.168.0.1;packageid=008;force=1;dryrun=0
 cPanel Licensing PHP Class
<?php
    include("cpl.inc.php");
    $cpl = new cPanelLicensing("barney@example.com", "12345luggage");
    $response = (array)$cpl->changeip(array(
		"oldip" => "127.0.0.1", 
		"newip" => "192.168.0.1", 
		"packageid" => "008", 
		"force" => "1", 
		"dryrun" => "0"));
    ?>
 cPanel Licensing Perl Module
use cPanelLicensing;
my $licenseManager = new cPanelLicensing(user => 'barney\@example.com', pass => '12345luggage');
$licenseManager->changeip(
	'oldip' 		=> '127.0.0.1', 
	'newip' 		=> '192.168.0.1', 
	'packageid'		=> '008', 
	'force' 		=> '1', 
	'dryrun 		=> '0',
);
 Output (JSON)
{
  "status": 0,
  "reason": "Transferred TRAININGSEMINAR-INTERNAL license 6794006 in the 'Test Group*' group on 127.0.0.1 to 192.168.0.1.",
  "newip": "127.0.0.1",
  "oldip": "192.168.0.1"
}
 Output (XML)
<XMLtransfer oldip="127.0.0.1" newip="192.168.0.20" status="1" reason="Transferred TRAININGSEMINAR-INTERNAL license 6794006 in the 'Test Group*' group on 127.0.0.1 to 192.168.0.1."/>
 Output (YAML)
--- 
newip: 127.0.0.1
oldip: 192.168.0.20
reason: Transferred TRAININGSEMINAR-INTERNAL license 6794006 in the 'Test Group*' group on 127.0.0.1 to 192.168.0.1.
status: 1

Parameters

ParameterTypeDescriptionPossible valuesExample
oldipstring

Required

The license's current IP address.

A valid IP address on the server.127.0.0.1
newipstring

Required

The license's new IP address.

A valid IP address on the server.192.168.0.1
packageidstring

Required

The license's package ID.

If you do not use this parameter, the function transfers all of the licenses on the current IP address.

Note:

This parameter is optional if the current IP address only possesses one package ID.

A valid package ID.

The List Package Information function returns a list of possible values.

008
forceBoolean

Whether to force a license transfer if the transfer adds a charge to a deactivated IP address.

This parameter defaults to 0.

  • 1 — Force a transfer.
  • 0 — Do not force a transfer.
1
dryrunBoolean

Whether to show license information but not transfer the license.

This parameter defaults to 0.

  • 1 — Show license information.
  • 0 — Transfer the license.
0

Returns

ReturnTypeDescriptionPossible valuesExample
oldipstringThe license's old IP addressA valid IP address on the server.127.0.0.1
newipstringThe license's new IP address.A valid IP address on the server.192.168.0.1
reasonstringWhether the function added the pickup phrase.A string value.Transferred TRAININGSEMINAR-INTERNAL license 6794006 in the 'Test Group*' group on 127.0.0.1 to 192.168.0.1.
statusBooleanWhether the function succeeded.
  • 1 —Success.

  • 0 — Failure.
1