Retrieving Plesk License Information
One of the tasks the extension developers face is retrieving the data about the Plesk license keys installed on the server. To make it easy for an extension to obtain the Plesk license key information, the pm_License class was introduced in Plesk 12.5.
The pm_License class enables the retrieval of the main and add-on Plesk license keys, as well as retrieval of the list of all add-on keys with the ability to filter by the product name. Some usage examples are provided below:
Creating a new main license key object:
$license = new pm_License();
Creating a new add-on license key object:
$keyNumber = 'APS.02960584.0008'; $license = new pm_License($keyNumber);
Retrieving the values of all license key properties:
Retrieving the value of a license key property with a specific name:
Retrieving the list of all add-on keys:
Retrieving the list of all add-on keys with a specific product name:
$productName = 'security-core-with-atomicorp-modsecurity-rules'; pm_License::getAdditionalKeysList($productName);
Leave your comments on this page
Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.