PHP Classes

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

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 505 All time: 5,792 This week: 47Up
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: 42
All time rank: 109211 in Czech Republic Czech Republic
Week rank: 195 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 (6)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:505
This week:0
All time:5,792
This week:47Up