Download the PHP package tweekersnut/license-sdk without Composer
On this page you can find all versions of the php package tweekersnut/license-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tweekersnut/license-sdk
More information about tweekersnut/license-sdk
Files in tweekersnut/license-sdk
Package license-sdk
Short Description Official PHP SDK for TweekersNut License Management System
License MIT
Homepage https://github.com/TaranpreetSinghRayat/license-sdk
Informations about the package license-sdk
TweekersNut License SDK for PHP
Official PHP SDK for integrating TweekersNut License Management System into your applications.
Features
- 🔐 License Activation - Activate licenses with hardware binding
- ✅ License Validation - Online and offline validation with caching
- 🎯 Feature Gating - Control features based on license type
- 💻 Hardware Fingerprinting - Bind licenses to specific machines (excludes USB/removable storage)
- ⚡ Smart Caching - Automatic caching to reduce server load
- 🛡️ Exception Handling - Proper error handling with custom exceptions
- 🌐 Cross-Platform - Works on Windows, Linux, and macOS
Installation
Install via Composer:
Quick Start
1. Initialize the Client
2. Activate a License
3. Validate License
4. Check Features
Complete Example
API Reference
LicenseClient
Constructor
$serverUrl- License server URL (e.g.,https://license.yourdomain.com)$publicKey- Public key in PEM format for signature verification$licenseFile- Optional path to store license file
Methods
activate(string $licenseKey): array
Activate a license with the provided license key.
Returns: ['success' => true, 'message' => '...']
Throws: LicenseException on failure
validate(bool $online = true): array
Validate the current license.
Parameters:
$online-truefor online validation,falsefor offline
Returns: ['valid' => true, 'license_key' => '...', 'features' => [...]]
Throws: ValidationException if no license is activated
hasFeature(string $featureName): bool
Check if a specific feature is enabled.
Returns: true if feature is enabled, false otherwise
getFeatures(): array
Get all enabled features.
Returns: Array of feature names
deactivate(): array
Deactivate the current license.
Returns: ['success' => true, 'message' => '...']
Throws: LicenseException on failure
isActivated(): bool
Check if a license is currently activated.
Returns: true if activated, false otherwise
getLicenseInfo(): ?array
Get current license information.
Returns: License data array or null if not activated
Integration Examples
WordPress Plugin
Laravel Application
Standalone Application
Hardware Fingerprinting
The SDK automatically collects hardware information for license binding:
- ✅ CPU ID - Processor serial number
- ✅ System Disk Serial - Primary disk only (excludes USB/external drives)
- ✅ MAC Address - Primary network adapter
- ✅ Motherboard Serial - Motherboard identifier
- ✅ OS Information - Operating system type and version
Important: The SDK only fingerprints permanent hardware. USB drives, external storage, and removable media are excluded to prevent false hardware change detections.
Caching
The SDK automatically caches validation results for 15 minutes to reduce server load and improve performance. Cache is stored in the system temp directory by default.
Error Handling
The SDK provides specific exceptions for different error types:
Requirements
- PHP 8.0 or higher
- cURL extension
- JSON extension
- OpenSSL extension
Support
- Documentation: https://docs.tweekersnut.com/license-sdk
- Issues: https://github.com/tweekersnut/license-sdk/issues
- Email: [email protected]
License
MIT License. See LICENSE file for details.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
Made with ❤️ by TweekersNut Network
All versions of license-sdk with dependencies
ext-curl Version *
ext-json Version *
ext-openssl Version *