PHPackages                             xzh/php-server-sdk - 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. xzh/php-server-sdk

ActiveLibrary

xzh/php-server-sdk
==================

xzh open platform sdk

013PHP

Since Sep 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/conglei1981/xzh)[ Packagist](https://packagist.org/packages/xzh/php-server-sdk)[ RSS](/packages/xzh-php-server-sdk/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

熊掌号开放平台基础sdk说明
==============

[](#熊掌号开放平台基础sdk说明)

sdk提供的能力
--------

[](#sdk提供的能力)

- 消息加减密 lib/AesEncryptUtil.php
- auth授权 lib/Api/AuthApi.php
- 第三方服务商授权相关 lib/Api/TpAuthApi.php
- OpenAPI curl基类 lib/Api/OpenApi.php

目录结构说明
------

[](#目录结构说明)

```

|____composer.lock
|____test                      #测试目录
| |____Api
| | |____TpAuthApiTest.php     #第三方服务商授权相关测试
| | |____OpenApiTest.php       #OpenAPI调用示例
| | |____AuthApiTest.php       #熊掌号授权相关测试
| |____Encrypt
| | |____AesEncryptTest.php    #消息加减密测试
|____README.md
|____lib
| |____SHA1Util.php            #SHA1签名工具类
| |____XzhConst.php
| |____XzhException.php
| |____XzhHttpClient.php
| |____XzhError.php
| |____XzhBase.php
| |____XmlUtil.php             #XML处理工具类
| |____Api                     #API
| | |____AuthApi.php           #授权相关API
| | |____TpAuthApi.php         #第三方服务商授权相关API
| | |____OpenApi.php           #OpenAPI基类
| |____AesEncryptUtil.php      #AES 消息加减密
|____composer.json             #composer项目依赖配置

```

使用说明
----

[](#使用说明)

- 项目为Composer项目，需要安装Composer
- 在根目录下 composer update 下载依赖包

```

demo
lib
test
vendor
composer.json
composer.lock
README.md

```

- 自动加载 require\_once('/path/vendor/autoload.php');

示例
--

[](#示例)

```

use Xzh\Client\Api\AuthApi;

require_once(dirname(__DIR__) . '/vendor/autoload.php');

$clientId = '6HzvBSGAvkFMUrhELUZayfH2No86t1k';
$clientSecret = 'umHZ1Wd33IYPr1zHXLKqXvHMGXCgdPRO';
$xzhAuth = new AuthApi();
$creInfo = $xzhAuth->getAccessTokenByClientCredentials($clientId, $clientSecret);
print_r($creInfo);

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6904254?v=4)[conglei1981](/maintainers/conglei1981)[@conglei1981](https://github.com/conglei1981)

---

Top Contributors

[![conglei198](https://avatars.githubusercontent.com/u/171305391?v=4)](https://github.com/conglei198 "conglei198 (1 commits)")

### Embed Badge

![Health badge](/badges/xzh-php-server-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/xzh-php-server-sdk/health.svg)](https://phpackages.com/packages/xzh-php-server-sdk)
```

PHPackages © 2026

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