PHPackages                             lilwil/geetest - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. lilwil/geetest

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lilwil/geetest
==============

Geetest For ThinkPHP5

1.0.2(9y ago)12811Apache-2.0PHP

Since Oct 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/lilwil/geetest)[ Packagist](https://packagist.org/packages/lilwil/geetest)[ RSS](/packages/lilwil-geetest/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (5)Used By (1)

极验geetest
---------

[](#极验geetest)

thinkphp5可用的极验扩展

安装
--

[](#安装)

> composer require lilwil/geetest

\##使用 ###参数配置 在配置文件配置geetest配置，需要到官网申请

```
//举例
'geetest'               => [
       'captcha_id'=>'40c653bd06de23cece65d180d94b937f',
       'private_key'=>'0c54bad6d2419733de49db4826d83942',
    ],

```

\###模板里的调用

```

function doOk(){
	//TODO:验证成功，对表单的操作
	// $("#embed-submit").attr("disabled", false);
	// $("#embed-submit").attr("style", 'background:#fe693e');
}
var handlerEmbed = function (captchaObj) {
    // 将验证码加到id为captcha的元素里
    captchaObj.appendTo("#embed-captcha");
    captchaObj.onSuccess(doOk);
    captchaObj.onReady(function () {
        //TODO:页面加载完毕之后执行的方法
        // $("#embed-submit").attr("disabled", true);
        // $("#embed-submit").attr("style", 'background:#A79995');
        //$("#wait")[0].className = "hide";
    });
};
$.ajax({
   // 获取id，challenge，success（是否启用failback）
   url: "{:geetest_url()}?t=" + (new Date()).getTime(), // 加随机数防止缓存
   type: "get",
   dataType: "json",
   success: function (data) {
   // 使用initGeetest接口
   // 参数1：配置参数
   // 参数2：回调，回调的第一个参数验证码对象，之后可以使用它做appendTo之类的事件
   initGeetest({
        gt: data.gt,
        challenge: data.challenge,
        product: "float", // 产品形式，包括：float，embed，popup。注意只对PC版验证码有效
        offline: !data.success // 表示用户后台检测极验服务器是否宕机，一般不需要关注
      }, handlerEmbed);
   }
});

```

### 控制器里验证

[](#控制器里验证)

```
//需要传入$_POST请求的数据
if(!geetest_check($post)){
 //验证失败
};

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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 ~12 days

Total

3

Last Release

3527d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3c930281ed6bd1bcd7ceafb0db23d361929d8334ecb87c44690510d78e7635a?d=identicon)[lilwil](/maintainers/lilwil)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/lilwil-geetest/health.svg)

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

PHPackages © 2026

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