-
-
Notifications
You must be signed in to change notification settings - Fork 29
Sample Folder Guide
The Sample Folder contains all the example code files needed to interact with the SLM Plus license management API. Each file demonstrates how to perform a specific action, including creating, activating, deactivating, checking, and retrieving license information. This guide will walk you through the files in the Sample Folder and how to use them.
Each sample file is self-contained, making it easy to integrate directly into your PHP projects or modify as needed. Here’s a list of the files included and a brief description of each:
- CoreConfig.php: Contains global settings, constants, and utility methods for API requests and responses.
-
LicenseAPI.php: Acts as an API wrapper with methods for each license management action, using
CoreConfig.php
to send requests. -
Action Files:
-
CreateLicense.php
: Contains code to create a new license. -
ActivateLicense.php
: Handles license activation for a specific domain or device. -
DeactivateLicense.php
: Manages deactivation of a license from a domain or device. -
CheckLicense.php
: Checks the current status of a license. -
GetLicenseInfo.php
: Retrieves detailed information about a license.
-
Each sample file includes an example usage section to help you get started quickly. To use any sample file:
-
Configure Core Settings: Before using any sample, open
CoreConfig.php
and set yourAPI_URL
andSECRET_KEY
values to match the settings from your SLM Plus installation. -
Run an Action: Open the desired action file (e.g.,
CreateLicense.php
), adjust any necessary parameters (such aslicense_key
orregistered_domain
), and run the script. - Handle Responses: Each file will output a response message based on the API action’s success or failure, letting you know if the action was completed successfully or if further troubleshooting is required.
Tip: For consistent integration, start with
CoreConfig.php
to ensure that all API requests are securely configured.
For details on each action, refer to our sample wiki pages.
If you encounter issues or need clarification, consult the Return Codes and Messages page to interpret API responses or refer to the Troubleshooting Guide (if available) for additional help.
By using the Sample Folder, you can quickly implement secure license management in your projects with minimal setup and modification.
Updated and maintained by Epikly