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.
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.
Sample Files Overview
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.phpto 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.
How to Use the Sample Files
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.phpand set yourAPI_URLandSECRET_KEYvalues 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_keyorregistered_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.phpto ensure that all API requests are securely configured.
Additional Resources
For details on each action, refer to our sample wiki pages.
Troubleshooting and Support
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