PHPackages                             licensetorun/php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. licensetorun/php-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

licensetorun/php-sdk
====================

Framework-agnostic PHP SDK for Licensetorun.com — activate, validate, swap and check updates for your licensed product. Zero dependencies.

v1.0.0(yesterday)00MITPHPPHP ^8.0CI failing

Since Jun 18Pushed yesterdayCompare

[ Source](https://github.com/licensetorun/php-sdk)[ Packagist](https://packagist.org/packages/licensetorun/php-sdk)[ RSS](/packages/licensetorun-php-sdk/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

PHP License SDK
===============

[](#php-license-sdk)

A framework-agnostic PHP client for [Licensetorun.com](https://licensetorun.com). **Zero dependencies** — just PHP 8.0+, cURL and JSON. Use it in plain PHP, Symfony, Slim, a CLI, or anywhere you don't have the Laravel package.

Install
-------

[](#install)

```
composer require licensetorun/php-sdk
```

Or vendor it without Composer — the SDK is two files:

```
require __DIR__ . '/src/LicenseResult.php';
require __DIR__ . '/src/LicenseClient.php';
```

Usage
-----

[](#usage)

```
use Licensetorun\LicenseSdk\LicenseClient;

$license = new LicenseClient([
    'api_base'    => 'https://licensetorun.com',
    'product_id'  => 'PRODUCT-PUBLIC-UUID',  // from the product page in the dashboard
    'license_key' => 'CUSTOMER-KEY',
    'instance'    => 'customer-instance',    // optional — defaults to gethostname()
]);

// Activate once (consumes a seat):
$result = $license->activate();
if ($result->failed()) {
    exit('Activation failed: ' . $result->message());
}

// Gate a feature:
if ($license->isValid()) {
    // ...licensed feature...
}

// Inspect the full result:
$result = $license->validate();
$result->ok();                 // bool
$result->error();              // e.g. "license_expired", "ip_not_allowed"
$result->get('license.status');// dot-access into the response
```

### Move a seat to a new server

[](#move-a-seat-to-a-new-server)

```
$license->swap('old-server.com', 'new-server.com');
```

### Check for updates

[](#check-for-updates)

```
$update = $license->checkForUpdate('1.2.0');
if ($update->get('update_available')) {
    $downloadUrl = $update->get('download_url'); // short-lived signed URL
}
```

Notes
-----

[](#notes)

- Every method returns a `LicenseResult` and **never throws** on HTTP/network errors — a failed request comes back as `error() === 'network_error'`.
- `validate()` is **not** cached here (unlike the Laravel package). Call it on a schedule or cache the result yourself (e.g. for a few hours) if you check on every request, so you don't hit the API each time.

MIT licensed.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/130300974?v=4)[Bweb Solutions LLC](/maintainers/bwebsolutionsllc)[@bwebsolutionsllc](https://github.com/bwebsolutionsllc)

---

Tags

sdklicensesaaslicensinglicensetorun

### Embed Badge

![Health badge](/badges/licensetorun-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/licensetorun-php-sdk/health.svg)](https://phpackages.com/packages/licensetorun-php-sdk)
```

###  Alternatives

[aws/aws-crt-php

AWS Common Runtime for PHP

422319.4M9](/packages/aws-aws-crt-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
