-
-
Notifications
You must be signed in to change notification settings - Fork 29
Checking License Status
The CheckLicense.php
file allows you to check the status of a license, which can help determine if it is active, expired, or blocked. This guide will walk you through configuring and using CheckLicense.php
to verify license status.
- Ensure
CoreConfig.php
is configured with your API URL and secret key. - Verify that
LicenseAPI.php
is included in your project, as it provides the core method for checking license status.
-
Open
CheckLicense.php
. -
Define the license key to check by setting up a simple associative array:
$licenseData = [ 'license_key' => 'YOUR_LICENSE_KEY' // The license key you want to check ];
Replace
'YOUR_LICENSE_KEY'
with the actual license key you wish to verify.
-
Instantiate
CheckLicense
. -
Call the
check()
method with the$licenseData
array. Here’s how:require_once 'CheckLicense.php';
$checkLicense = new CheckLicense(); $checkLicense->check($licenseData['license_key']);
This sends a request to check the status of the specified license key.
CheckLicense.php
provides a response indicating the license’s current status. Here’s what to expect:
- Active: If the license is active, you’ll see a message confirming its active status.
- Expired: If the license has expired, an expiration message will be displayed.
- Blocked: If the license is blocked, you’ll be notified to contact support.
Below is a complete example of using CheckLicense.php
to check the status of a license:
require_once 'CheckLicense.php';
$licenseData = [ 'license_key' => 'YOUR_LICENSE_KEY' ];
$checkLicense = new CheckLicense(); $checkLicense->check($licenseData['license_key']);
The CheckLicense.php
script includes handling for various status responses:
- Active: Confirms the license is valid and in good standing.
- Expired: Notifies the user that the license has expired.
- Blocked: Alerts the user that the license is blocked, suggesting they contact support.
- Invalid License Key: If the license key is invalid, an error message will be displayed.
For detailed response handling, review the code in CheckLicense.php
.
Once you’ve configured and tested license status checking, you can proceed to additional actions:
Updated and maintained by Epikly