Extend a One Time License — XMLonetimeext.cgi

This Manage2 function allows you to extend a one time license.

Variables

Input

  • ip (string) — The IP address corresponding to the one time license you wish to extend.
    • Example: 127.0.0.0

Output

  • reason (string) — Information about the extension of the one time license.
  • status (boolean) — Describes whether or not the extension was successfully requested.
    • 1 — The extension was requested successfully.
    • 0 — The extension was not requested.
  • version (float) — Internal information used by the Manage2 API.

Examples

Using HTTP (direct API call)

Show Hide

Calling http://manage2.cpanel.net/XMLonetimeext.cgi? in a browser should produce output similar to the following:

<XMLonetimeext reason=" Dispatched notification  
Updates have been extended for the license on ip: 127.0.0.11.   
The old updates experiation time was: Mon Jul 11 03:27:02 2011 GMT. 
The new updates expiration time is: Tue Jul 10 03:27:02 2012 GMT.   
If your updates have already expired, you should run 
/usr/local/cpanel/cpkeyclt to reenable updates.  " status="1" 
version="0.1"/>

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:

  • JSONhttp://manage2.cpanel.net/XMLonetimeext.cgi?output=json&ip=127.0.0.1
  • YAMLhttp://manage2.cpanel.net/XMLonetimeext.cgi?output=yaml&ip=127.0.0.1
For more information about each of these output types, visit our Choosing an Output Type documentation.

Using a Perl module

Show Hide

The following is an example of a Perl module that will call XMLonetimeext.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.

extend_onetime_updates{
ip=>$ip
}

In the example above, $ip is meant to stand for the IP address corresponding to the one time license you would like to extend.

For more information about using a Perl module to call API functions, visit our page here.

Using a PHP class

Show Hide

The following is an example showing how to call the cPanelLicensing PHP class. You can use this class to pass input variables to the Manage2 API using a few short calls.

<?php

include("cpl.inc.php");

$cpl = new cPanelLicensing("__USERNAME__","__PASSWORD__");
$lisc = $cpl->extendOnetime(array(
		"ip" => $ip

	)
);

?>

In the example above, $ip is meant to stand for the IP address corresponding to the one time license you would like to extend.

PICK Remember: __USERNAME__ and __PASSWORD__ are meant to represent the username and password for your Manage2 account.

For more information about using a PHP class to call API functions, visit our page here.

Topic revision: r9 - 20 Oct 2009 - 16:50:15 - Main.JustinSchaefer
ManageTwo.XMLExtendOneTime moved from Sandbox.XMLExtendOneTime on 21 Jul 2009 - 19:11 by Main.JustinSchaefer - put it back
 

Copyright © cPanel 2000-2010.