PHPackages                             axguowen/think-smscaptcha - 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. axguowen/think-smscaptcha

ActiveLibrary

axguowen/think-smscaptcha
=========================

Simple SMS Captcha For ThinkPHP

065PHP

Since Apr 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/axguowen/think-smscaptcha)[ Packagist](https://packagist.org/packages/axguowen/think-smscaptcha)[ RSS](/packages/axguowen-think-smscaptcha/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ThinkPHP 短信验证码扩展
================

[](#thinkphp-短信验证码扩展)

一个简单的 ThinkPHP 短信验证码扩展

主要功能：短信验证码发送和验证

安装
--

[](#安装)

```
composer require axguowen/think-smscaptcha

```

用法示例
----

[](#用法示例)

首先配置config目录下的smscaptcha.php配置文件，然后可以按照下面的用法使用。

生成并发送短信验证码

```
use think\facade\SmsCaptcha;

// 手机号
$mobile = '188****8888';
// 生成发送短信验证码
$sendResult = SmsCaptcha::send($mobile);
// 如果成功
if(!is_null($sendResult[0])){
    echo '成功';
}
// 失败
else{
    echo $sendResult[1]->getMessage();
}
```

校验短信验证码

```
use think\facade\SmsCaptcha;

// 验证码校验
$verifyResult = SmsCaptcha::verify('188****8888', '486936');
// 验证通过
if(!is_null($verifyResult[0])){
    echo '通过';
}
// 错误
else{
    echo $sendResult[1]->getMessage();
}
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

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/5bb2b3388238042a25cf42dc44e5ff84adc241510354abae9e91573556753205?d=identicon)[axguowen](/maintainers/axguowen)

---

Top Contributors

[![axguowen](https://avatars.githubusercontent.com/u/61955804?v=4)](https://github.com/axguowen "axguowen (15 commits)")

### Embed Badge

![Health badge](/badges/axguowen-think-smscaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/axguowen-think-smscaptcha/health.svg)](https://phpackages.com/packages/axguowen-think-smscaptcha)
```

PHPackages © 2026

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