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

ActiveLibrary[Security](/categories/security)

zhuchunshu/php-csrf
===================

php-csrf

V1.0.2(4y ago)03[1 PRs](https://github.com/zhuchunshu/php-csrf/pulls)MITPHP

Since Jul 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/zhuchunshu/php-csrf)[ Packagist](https://packagist.org/packages/zhuchunshu/php-csrf)[ RSS](/packages/zhuchunshu-php-csrf/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

php-csrf
--------

[](#php-csrf)

### 获取取当前 CSRF Token的值

[](#获取取当前-csrf-token的值)

```
// $time为token有效期
return csrf_token($time=120);
// or
return \Csrf\Csrf::get($time);
```

### 验证Csrf-token

[](#验证csrf-token)

```
return \Csrf\Csrf::check($token);
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Every ~1 days

Total

3

Last Release

1820d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48b06512b65848936eaa00bb25e52afd04e0ddd9fe034d892ba1b65ab67956e2?d=identicon)[Inkedus](/maintainers/Inkedus)

---

Top Contributors

[![zhuchunshu](https://avatars.githubusercontent.com/u/57830364?v=4)](https://github.com/zhuchunshu "zhuchunshu (10 commits)")

### Embed Badge

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

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

###  Alternatives

[mews/purifier

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

2.0k18.7M143](/packages/mews-purifier)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24857.5k](/packages/vormkracht10-laravel-mails)[backstage/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24884.4k11](/packages/backstage-laravel-mails)[exceedone/exment

Management for Product, Client, Contracts, Subscription, ...

28038.8k](/packages/exceedone-exment)[concrete5/core

Concrete core subtree split

20166.1k50](/packages/concrete5-core)

PHPackages © 2026

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