A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products.

Overview

PHP-based Software License Server

A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products. Comes with a SDK and command-line tool. Works anywhere that PHP runs.

For when you need a robust license server but want to just get back to writing software.

CubicleSoft Software License Server Overview/Intro video

See it in action:

Donate Discord

Features

  • Generate unique encrypted serial numbers on a per-major version basis. Each encrypted serial number contains: Date created or date the license expires, product ID, product classification, major and minor version numbers, per-application custom bits (e.g. a hardware hash, digital/physical copy, purchase avenue, single/multi-user license), and per-user hash checksum bits.
  • Quickly and easily manage products (up to 1,024), major versions (up to 256 per product), product classes (up to 16 per major version - e.g. Standard, Pro, Enterprise), and software licenses (unlimited).
  • Supports per-license activation limits, download limits, and revoking the occasional rogue license.
  • Supports various common customizations (e.g. storing an external order number alongside each license, setting the character encoding scheme for each major version's serials, etc).
  • Can generate complex order numbers designed to keep business finances private while still supporting account reconciliation of transactions (e.g. SEC GAAP compliance).
  • Optional history logging for all license actions.
  • Has a PHP SDK for communicating directly with the service.
  • Also comes with a complete, question/answer enabled command-line interface. Nothing to compile. Cross platform.
  • Has a liberal open source license. MIT or LGPL, your choice.
  • Designed for relatively painless integration into your project.
  • Sits on GitHub for all of that pull request and issue tracker goodness to easily submit changes and ideas respectively.

Getting Started

Place the contents of this repository in a secure location on a host. Note that for performance reasons there is no security for the license server. However, it only starts as a localhost-only server on port 24276, which means someone has to gain access to the host to make changes directly.

To start the server, simply run:

php server.php

In a separate window/terminal, run:

php tools.php

Which utilizes the PHP SDK to provide a guided command-line interface for setting up products, versions, and managing licenses.

The PHP SDK is located at support/sdk_license_server.php and is standalone (i.e. you can copy just that file to your application and it'll work fine). Be sure to check out the SDK documentation. Use the PHP SDK to provide the interface between a web server running PHP and the license server to do things such as creating a license after completing a purchase, retrieving the list of licenses that the user owns, and activating/deactivating licenses when the software is installed/uninstalled. Example usage of the SDK can be found in tools.php.

To install the server so that it runs at boot, first stop any running instances and then run the following as root/Administrator:

php server.php install

Then start the php-license-server system service using standard OS tools.

Performance

For additional performance, install the PECL libev extension via pecl install ev and raise the system ulimit to support thousands of simultaneous connections. Since connections are generally short-lived, performance gains will only be noticeable under heavy system load. Also, the PECL libev extension itself does not function properly on Windows and is therefore ignored by this software.

The included concurrency_test.php is a basic benchmarking script. In concurrency testing, the script verified over 6,150 serial numbers per second (verification only) and a separate run of the script activated over 4,275 serial numbers per second (activation only) on an Intel 6th Gen Core i7 running Windows 10 Pro (64-bit). The underlying serial number verification class can validate up to 27,000 serials numbers per second in a single thread on the same hardware.

While the concurrency_test.php script can be run standalone, it is designed to be run with CubicleSoft PHP concurrency tester.

You might also like...
High-performance, low-memory-footprint, single-file embedded database for key/value storage

LDBA - a fast, pure PHP, key-value database. Information LDBA is a high-performance, low-memory-footprint, single-file embedded database for key/value

High performance pocketmine 4.0 vote plugin

Voting38 This is a threaded high performance voting plugin for PocketMine-MP API 4.0 You can configure messages and voting rewards in the config. Ther

A cross-language remote procedure call(RPC) framework for rapid development of high performance distributed services.

Motan Overview Motan is a cross-language remote procedure call(RPC) framework for rapid development of high performance distributed services. Related

High performance mine reset plugin for PocketMine-MP 4.0.0

MineReset38 High performance mine reset plugin for PocketMine-MP 4.0.0 Unlike other plugins, this plugin is not threaded but asynchronous. When a mine

A high-performance event loop library for PHP
A high-performance event loop library for PHP

🐇 A high-performance event loop library for PHP 🐇

The game is implemented as an example of scalable and high load architecture combined with modern software development practices
The game is implemented as an example of scalable and high load architecture combined with modern software development practices

Crossword game The game is implemented as an example of scalable and high load architecture combined with modern software development practices Exampl

A multi-purpose web-shell that simplifies running shell commands on webserver
A multi-purpose web-shell that simplifies running shell commands on webserver

This webshell can be used for multi-purposed especially most if you want to manage your web server but you are in an emergency , so why not use a webshell:)

Purpose of plugin

Overview Purpose of plugin The magento/composer-root-update-plugin Composer plugin resolves changes that need to be made to the root project composer.

A horrendous PM plugin to manually load all the chunks in your world without logging on. Only for the sole purpose of aiding in PM4 - DF world conversion.

ChunkLoader A horrendous PM plugin to manually load all the chunks in your world without logging on. Only for the sole purpose of aiding in PM4 - DF

Comments
  • Question of understanding: Isn't the serial number for itself sufficient when verifying it?

    Question of understanding: Isn't the serial number for itself sufficient when verifying it?

    Hi CubicleSoft!

    I'm working my way into your very nice project and stumbled accross the following thing I need to understand:

    I created a license with LicenseServer::CreateLicense($productid, $majorver, $userinfo, $options = array()) and used a $_SERVER["HTTP_HOST"] (in the license requesting client) as my value for $userinfo (as for registering websites in my demo project).

    My question is: When I now have a serial number and try to verify it using LicenseServer::VerifySerial($serialnum, $productid, $majorver, $userinfo, $mode = false, $log = false) or more specific: LicenseServer::VerifySerial($serialnum, $productid, $majorver, $userinfo) the $userinfo is not optional.

    I thought serial numbers are unique? Would it be possible to make verification of serial numbers without $userinfo?

    If not and say in situations where you don't have (or want to use it because it might change, as in my use case the requesting clients might have changed their domain from www.example.com to example.com) the extra $userinfo one would use GetLicenses and loop over all created licenses (revoked, expired, active...) to search for the serial number.

    Please excuse if I have a fundamental misunderstanding here.

    opened by eidenschink 3
  • Update tools.php

    Update tools.php

    Line 275 in Tools.php references "pid", when the proper labeling is "product_id". This was causing the RevokeLicense method to fail when pid's were <> 0.

    opened by TylerBoni 1
Owner
CubicleSoft
CubicleSoft
A MCPE server software that backporting new Minecraft: Bedrock Edition to older PocketMine versions with better stability and performance.

CoarseMC is a server software that backports new Minecraft: Bedrock Edition versions to older PocketMine versions with better stability and performance, while retaining as many features from the new PocketMine-MP versions as possible.

null 5 May 21, 2022
Tars is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.

TARS - A Linux Foundation Project TARS Foundation Official Website TARS Project Official Website WeChat Group: TARS01 WeChat Offical Account: TarsClou

THE TARS FOUNDATION PROJECTS 9.6k Jan 1, 2023
Leaf's very own high-speed, high-performance server

[WIP] Leaf Eien Server Eien is Leaf's implementation of a high-speed, high-performance server based on powerful tools like Open Swoole and Swoole. Eie

Leaf Framework 8 Dec 28, 2022
Fresns core library: Cross-platform general-purpose multiple content forms social network service software

About Fresns Fresns is a free and open source social network service software, a general-purpose community product designed for cross-platform, and su

Fresns 82 Dec 31, 2022
Installable com_content/category overrides with configuration settings to create card layouts

Installable com_content/caregory overrides with configuration settings to create card layouts. Uses default bootstrap css only.

Brian Teeman 10 Jan 5, 2023
Composer Repository Manager for selling Magento 2 extension and offering composer installation for ordered packages.

Magento 2 Composer Repository Credits We got inspired by https://github.com/Genmato. Composer Repository for Magento 2 This extension works as a Magen

EAdesign 18 Dec 16, 2021
A simple way to know if you are on the list of major security breaches like "HIBP", but it is specific for Iran.

Leakfa.com A simple way to know if you are on the list of major security breaches like "HIBP", but it is specific for Iran. Service content This produ

Leakfa 100 Nov 20, 2022
Major Security Vulnerability on PrestaShop Websites - CVE-2022-31101

Fix Major Security Vulnerability on PrestaShop Websites ?? CVE-2022-31101 detector and fixer! A newly found exploit could allow remote attackers to ta

Mathias Reker ⚡️ 25 Nov 22, 2022
A WordPress package to nudge users to upgrade their software versions (starting with PHP)

whip A WordPress package to nudge users to upgrade their software versions (starting with PHP) Requirements The following versions of PHP are supporte

Yoast 71 Oct 18, 2022
High performance view templating API for PHP applications using tags & expressions inspired by Java JSTL and C compiler

View Language API Table of contents: About Expressions Tags Configuration Compilation Installation Unit Tests Examples Reference Guide About This API

Lucian Gabriel Popescu 0 Jan 9, 2022