michalsn/codeigniter-signed-url

Signing URL functionality for CodeIgniter 4 framework

Installs: 3 097

Dependents: 0

Suggesters: 0

Security: 0

Stars: 17

Watchers: 5

Forks: 4

Open Issues: 1

pkg:composer/michalsn/codeigniter-signed-url

v2.1.0 2023-10-08 17:58 UTC

This package is auto-updated.

Last update: 2025-10-04 13:18:58 UTC


README

Prevent manual URL manipulation and auto expiry URLs.

PHPUnit PHPStan Deptrac Coverage Status

Installation

composer require michalsn/codeigniter-signed-url

Overview

We can sign URLs very easy with two main methods that act similar to the helper functions known from CodeIgniter's URL helper.

echo signedurl()->siteUrl('controller/method?query=string');
// https://example.com/controller/method?query=string&signature=signature-goes-here
echo signedurl()->setExpiration(DAY * 2)->urlTo('namedRoute', 12);
// https://example.com/route/name/12?expiration=1671980371&signature=signature-goes-here

Versions

Versions are not compatible - URLs generated in one version of Signed URL will not work with another version.

CodeIgniter version Signed URL version
>= 4.4 2.*
< 4.4 1.*

Docs

https://michalsn.github.io/codeigniter-signed-url