PHPackages                             littlemo/baidu - 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. littlemo/baidu

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

littlemo/baidu
==============

the littlemo baidu utils

v1.0.0(4y ago)12Apache-2.0PHPPHP ^7.0

Since Nov 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/littlemolh/composer-baidu)[ Packagist](https://packagist.org/packages/littlemo/baidu)[ Docs](https://ggui.cn/)[ RSS](/packages/littlemo-baidu/feed)WikiDiscussions main Synced 1w ago

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

百度 LittleMo
===========

[](#百度-littlemo)

[![Total Downloads](https://camo.githubusercontent.com/1bef58ba4f383449fff2b4eef298a8851a22b808e6ff6448e2a34334466fedc0/68747470733a2f2f706f7365722e707567782e6f72672f6c6974746c656d6f2f62616964752f646f776e6c6f616473)](https://packagist.org/packages/littlemo/baidu)[![Latest Stable Version](https://camo.githubusercontent.com/6b10c2ad4539d89e7948efd8dfa57aba493ce0531f56b1c67cc869f0c4fecb04/68747470733a2f2f706f7365722e707567782e6f72672f6c6974746c656d6f2f62616964752f762f737461626c65)](https://packagist.org/packages/littlemo/baidu)[![Latest Unstable Version](https://camo.githubusercontent.com/a3c954813a408248275bae2ea6ee1147c000423429a184ef986377c5ce27eb8b/68747470733a2f2f706f7365722e707567782e6f72672f6c6974746c656d6f2f62616964752f762f756e737461626c65)](https://packagist.org/packages/littlemo/baidu)[![PHP Version](https://camo.githubusercontent.com/21223b9ffedc1feec4026ec59947bafeec1e45b69a0e2fd1383975636e8d09a6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e302d3838393242462e737667)](http://www.php.net/)[![License](https://camo.githubusercontent.com/a98032f64551d86c1096f48c843aa1f028023f4d42d2bef257323828c2014b0f/68747470733a2f2f706f7365722e707567782e6f72672f6c6974746c656d6f2f62616964752f6c6963656e7365)](https://packagist.org/packages/littlemo/baidu)

### 介绍

[](#介绍)

php常用工具库

### 安装教程

[](#安装教程)

composer.json

```
{
    "require": {
        "littlemo/baidu": "~1.0.0"
    }
}
```

### 使用说明

[](#使用说明)

#### 公共

[](#公共)

===

> 公共部分被所有方法继承，实例化任意类均可调用

```
use littlemo\baidu\Class;

$Class = new Class($apiKey, $secretKey, $planId );
```

实例化参数

参数类型是否必填说明apiKeystringN应用的API KeysecretKeystringN应用的Secret KeyplanIdstringN方案的id信息，请在（人脸实名认证）控制台查看创建的（H5）方案的方案ID信息#### 获取Access Token

[](#获取access-token)

> 百度AIP开放平台使用OAuth2.0授权调用开放API，调用API时必须在URL中带上access\_token参数

##### 示例代码

[](#示例代码)

```
use littlemo\wechat\Class;

$Class = new Class($apiKey, $secretKey);

$result = $Class->access_token();

if ($result) {
    echo '获取Access token成功';
    $token = $Class->getMessage();
} else {
    echo "获取Access token失败";
    $errorMsg = $Class->getErrorMsg();
}

//查询完整的回调消息
$intactMsg = $Class->getIntactMsg();
```

**返回示例**

```
{
  "refresh_token": "25.b55fe1d287227ca97aab219bb249b8ab.315360000.1798284651.282335-8574074",
  "expires_in": 2592000,
  "scope": "public wise_adapt",
  "session_key": "9mzdDZXu3dENdFZQurfg0Vz8slgSgvvOAUebNFzyzcpQ5EnbxbF+hfG9DQkpUVQdh4p6HbQcAiz5RmuBAja1JJGgIdJI",
  "access_token": "24.6c5e1ff107f0e8bcef8c46d3424a0e78.2592000.1485516651.282335-8574074",
  "session_secret": "dfac94a3489fe9fca7c3221cbf7525ff"
}
```

> [官方文档](https://ai.baidu.com/ai-doc/REFERENCE/Ck3dwjhhu)

#### 明镜实名认证方案（H5）

[](#明镜实名认证方案h5)

> 整理中...

### 参与贡献

[](#参与贡献)

1. littlemo

### 特技

[](#特技)

- 统一、精简

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Unknown

Total

1

Last Release

1645d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/0172f1321449429155012129cc51c21fe647f690c0a9bd992496482394fe014a?d=identicon)[xiaowei95](/maintainers/xiaowei95)

---

Top Contributors

[![25362583](https://avatars.githubusercontent.com/u/16798708?v=4)](https://github.com/25362583 "25362583 (1 commits)")[![littlemolh](https://avatars.githubusercontent.com/u/26665792?v=4)](https://github.com/littlemolh "littlemolh (1 commits)")

---

Tags

toolutilsbaidulittlemo

### Embed Badge

![Health badge](/badges/littlemo-baidu/health.svg)

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

###  Alternatives

[danielstjules/stringy

A string manipulation library with multibyte support

2.4k26.0M191](/packages/danielstjules-stringy)[phing/phing

PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.

1.2k21.7M876](/packages/phing-phing)[bamarni/composer-bin-plugin

No conflicts for your bin dependencies

52722.0M859](/packages/bamarni-composer-bin-plugin)[voku/arrayy

Array manipulation library for PHP, called Arrayy!

4875.5M16](/packages/voku-arrayy)[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M16](/packages/vaimo-composer-patches)[voku/stringy

A string manipulation library with multibyte support

1783.8M19](/packages/voku-stringy)

PHPackages © 2026

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