Licensify SDK

Licensify shares fully free and open source SDK.

PHP SDK

Our PHP SDK is located here:

https://github.com/licensify-api/Licensify-PHP-SDK

The path must be completed with the version of the API. The actual version is : 1.0

Using PHP SDK

Our PHP SDK is composed by a class, that needs a license, and an identifier :

$licensify = new Licensify("{LICENSE}", "{IDENTIFIER}");

The 2 variables explained :

  • LICENSE : the id of the license we want to use
  • IDENTIFIER : the identifier of this license. It could be a domain name, an url, an ip address, or an unique identifier.

Then, to manage the lifecycle of the license in your code, simply call these functions :

  • $licensify->Activate()
  • $licensify->Check()
  • $licensify->Deactivate()
  • $licensify->Cancel()
  • $licensify->Get("{FILE_SLUG}")

Example :

<?php
require_once("licensify-sdk.php");

$licensify = new Licensify("XXXXXXXXXXXXXXX", "domain.tld");
$result = $licensify->Activate();
if($result == true)
{
	// The license is valid and activated, do something here
}
else 
{
	// An error occured
}