PHPackages                             aryqs/csrf - 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. aryqs/csrf

AbandonedArchivedLibrary[Security](/categories/security)

aryqs/csrf
==========

Very simple csrf token verification for POST data

00PHP

Since Aug 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Aryqs-Ipsum/csrf)[ Packagist](https://packagist.org/packages/aryqs/csrf)[ RSS](/packages/aryqs-csrf/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

Simple CSRF token protection
============================

[](#simple-csrf-token-protection)

This repository contain two simplified methods to store and verify tokens. It prevent all unsafe HTTP requests.

POST and SESSION variables are stored in '\_token' values. This string can be changed in param of function

Install
-------

[](#install)

via composer

```
$ composer require aryqs/csrf

```

Usage
-----

[](#usage)

```
use aryqs\csrf\Token;

require __DIR__ . '/vendor/autoload.php';

# verify token
if(Token::verify()) {
    # ...
}
```

```

```

You can change the name of the key that store data in session and post by passing it in param of the function

```
Token::set('csrf');
Token::verify('csrf');
```

Licence
-------

[](#licence)

This code is licenced under MIT licence

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/64c8b0148b662d66ac97b44ab25870a2ab241f6dd8e6de1807223332a759c064?d=identicon)[aryqs](/maintainers/aryqs)

---

Top Contributors

[![arnoclr](https://avatars.githubusercontent.com/u/45895096?v=4)](https://github.com/arnoclr "arnoclr (5 commits)")

### Embed Badge

![Health badge](/badges/aryqs-csrf/health.svg)

```
[![Health](https://phpackages.com/badges/aryqs-csrf/health.svg)](https://phpackages.com/packages/aryqs-csrf)
```

###  Alternatives

[phpids/phpids

PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

791150.0k2](/packages/phpids-phpids)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k44](/packages/paragonie-ecc)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

4912.6k](/packages/nicobleiler-php-passphrase)[dwgebler/encryption

Encryption wrapper for PHP using libsodium — simple API for symmetric and asymmetric encryption, password hashing, digital signing, and message authentication.

317.5k](/packages/dwgebler-encryption)

PHPackages © 2026

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