PHP Classes

PHP License Key Generator API: Generate and validate software license keys

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 498 This week: 1All time: 5,828 This week: 571Up
Version License PHP version Categories
license-api 1.0.0GNU General Publi...5PHP 5, Validation, Security
Description 

Author

This package can generate and validate software license keys.

It takes as parameters several values like the name of the licensed user, license date, application id and the user computer host name.

The package can generate a string that combines these parameter values using hashing algorithm.

It can also verify of a given license string is valid from the same parameter values.

Picture of Juraj Puchký
  Performance   Level  
Name: Juraj Puchký is available for providing paid consulting. Contact Juraj Puchký .
Classes: 17 packages by
Country: Czech Republic Czech Republic
Age: 41
All time rank: 109511 in Czech Republic Czech Republic
Week rank: 50 Up1 in Czech Republic Czech Republic Up
Innovation award
Innovation award
Nominee: 6x

Example

<?php

namespace Devtech\License;

include_once
'Generator.php';
include_once
'License.php';
include_once
'Validator.php';

/**
 * Description of Test
 *
 * @author jpuchky
 */

/*
 * Generate License KEY
 */

$generator = new Generator();
$license = new License("Juraj Puchký", "10.5.2018", "License Test", "1239", "test.devtech.cz");
$licenseKey = $generator->generate($license);
file_put_contents("license.txt", $licenseKey);

/*
 * Validation of License KEY
 */

$licenseKey = file_get_contents("license.txt");
$license = new License("Juraj Puchký", "10.5.2018", "License Test", "1239", $_SERVER['SERVER_NAME']);
$validator = new Validator();
if(
$validator->validate($license, $licenseKey)) {
    echo
"License is VALID\n";
} else {
    echo
"License is not VALID\n";
}


Details

License API

Simple API for generating and validation of license key. You can simply secure your web application against inlegal copy.


  Files folder image Files  
File Role Description
Accessible without login Plain text file Example.php Example Example script
Plain text file Generator.php Class Class source
Plain text file License.php Class Class source
Accessible without login Plain text file license.txt Doc. Documentation
Accessible without login Plain text file README.md Doc. Documentation
Plain text file Validator.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:498
This week:1
All time:5,828
This week:571Up