PHPackages                             ozanhazer/safe-link - 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. [Security](/categories/security)
4. /
5. ozanhazer/safe-link

ActiveLibrary[Security](/categories/security)

ozanhazer/safe-link
===================

Sign URLs with expiration date to transfer data between projects

v1.0.0(4y ago)535MITPHPPHP ^7.0|^8.0

Since Jan 31Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ozanhazer/safelink)[ Packagist](https://packagist.org/packages/ozanhazer/safe-link)[ RSS](/packages/ozanhazer-safe-link/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

SafeLink
========

[](#safelink)

[![Unit Tests](https://github.com/ozanhazer/safelink/actions/workflows/php.yml/badge.svg)](https://github.com/ozanhazer/safelink/actions/workflows/php.yml/badge.svg)

Framework-agnostic, lightweight URL signer. You can use SafeLink to transfer data between projects.

Sign the url in project 1:

```
use Alfatron\SafeLink;

$safelink = new SafeLink('my-not-short-private-key');
$safelink->redirect('https://second-project/path', ['user' => 'test@example.com', 'action' => 'feed the cat'])
```

Retrieve it in project 2:

```
use Alfatron\SafeLink;

$safelink = new SafeLink('my-not-short-private-key');
$data = $safeLink->verify();
assert($data['user'], 'test@example.com');
```

Features
--------

[](#features)

- Uses built-in php serializer to serialize the data to be transferred.
- Can transfer any php type that can be serialized: `object`, `array`, `string`, `integer`.
- Supports php 7.0+.
- Has a default timeout of 10sec.s (customizable).
- Uses `openssl` extension to encrypt the data (`AES-256 CBC`)

Installation
------------

[](#installation)

Run `composer require ozanhazer/safe-link` and you're good to go!

Options
-------

[](#options)

Timeout is 10sec.s by default to avoid replay attacks. You can change it like:

```
use Alfatron\SafeLink;

$safeLink = new SafeLink($privateKey, ['timeout' => 2]);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

1562d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d4cb7f879c70b06456629132578cb92e0033c1a741af2ee285a4ee284bba610?d=identicon)[ozanhazer](/maintainers/ozanhazer)

---

Top Contributors

[![ozanhazer](https://avatars.githubusercontent.com/u/1287658?v=4)](https://github.com/ozanhazer "ozanhazer (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ozanhazer-safe-link/health.svg)

```
[![Health](https://phpackages.com/badges/ozanhazer-safe-link/health.svg)](https://phpackages.com/packages/ozanhazer-safe-link)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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