This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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.
Prerequisites
- Ensure
CoreConfig.phpis configured with your API URL and secret key. - Verify that
LicenseAPI.phpis included in your project, as it provides the core method for checking license status.
How to Use CheckLicense.php
Step 1: Set Up the License Data
-
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.
Step 2: Call the check Method
-
Instantiate
CheckLicense. -
Call the
check()method with the$licenseDataarray. 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.
Step 3: Handle the Response
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.
Example Usage
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']);
License Status Responses
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.
Next Steps
Once you’ve configured and tested license status checking, you can proceed to additional actions:
Updated and maintained by Epikly