PHPackages                             seffeng/afs - 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. seffeng/afs

ActiveLibrary

seffeng/afs
===========

PHP extension afs

v0.1.1(2y ago)01.0k1MITPHPPHP &gt;=7.1.3

Since Jul 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/seffeng/php-afs)[ Packagist](https://packagist.org/packages/seffeng/afs)[ Docs](https://github.com/seffeng/php-afs)[ RSS](/packages/seffeng-afs/feed)WikiDiscussions main Synced 1mo ago

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

ALIYUN AFS
----------

[](#aliyun-afs)

### 安装

[](#安装)

```
# 安装
$ composer require seffeng/afs
```

### 目录说明

[](#目录说明)

```
├─src
│  │  AfsClient.php
│  ├─Exceptions
│  │    AfsException.php
└─tests
    AfsTest.php

```

### 示例

[](#示例)

```
/**
 * SiteController
 */
use Seffeng\Afs\AfsClient;

class SiteController extends Controller
{
    public function index()
    {
        try {
            $accessKeyId = '';          // 阿里云 AccessKeyId
            $accessSecret = '';         // 阿里云 AccessKeySecret
            $appKey = '';               // 阿里云验证码 appkey

            $ip = '192.168.1.100';      // 客户端IP
            $scene = 'ic_login';        // 使用场景标识，必填参数，可从前端获取 [ic_login, nc_activity_h5, ...]
            $token = '1627557...';      // 请求唯一标识，必填参数，从前端获取
            $sig = '05XqrtZ0Ea...';     // 签名串，必填参数，从前端获取
            $sessionId = '01sWbn...';   // 会话ID，必填参数，从前端获取

            $afs = new AfsClient($accessKeyId, $accessSecret, $appKey);
            $afs->setScene($scene);
            $afs->setToken($token);
            $afs->setSig($sig);
            $afs->setSessionId($sessionId);
            $afs->setRemoteIp($ip);
            var_dump($afs->verify());
        } catch (AfsException $e) {
            echo $e->getMessage();
        } catch (\Exception $e) {
            echo $e->getMessage();
        }
    }
}
```

### 备注

[](#备注)

1、暂只支持滑动验证和智能验证；不支持无痕验证。

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity37

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.

###  Release Activity

Cadence

Every ~733 days

Total

2

Last Release

1021d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/30b3d8cc986a1ad37a55169b11812fea1cae31430dd8dbe1b3436dc58cc885bd?d=identicon)[seffeng](/maintainers/seffeng)

---

Top Contributors

[![seffeng](https://avatars.githubusercontent.com/u/3509779?v=4)](https://github.com/seffeng "seffeng (7 commits)")

---

Tags

phplaravelyii2seffengafs

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/seffeng-afs/health.svg)

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

###  Alternatives

[dragon-code/support

Support package is a collection of helpers and tools for any project.

238.7M101](/packages/dragon-code-support)[demi/php-gearman

Gearman job server workers helper

176.6k](/packages/demi-php-gearman)

PHPackages © 2026

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