PHPackages                             luoyt/wechat - 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. [API Development](/categories/api)
4. /
5. luoyt/wechat

ActiveLibrary[API Development](/categories/api)

luoyt/wechat
============

wechat sdk

v1.2(9y ago)027MITPHPPHP &gt;=5.4.4

Since Oct 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/luoyt/wechat)[ Packagist](https://packagist.org/packages/luoyt/wechat)[ RSS](/packages/luoyt-wechat/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

微信公众平台开发
--------

[](#微信公众平台开发)

[微信开发文档](http://mp.weixin.qq.com/wiki "开发文档")

自动处理代码例子:blush:
---------------

[](#自动处理代码例子blush)

```
$options['token'] = "123456";
$options['appid'] = '';
$options['secret'] = '';
$options['access_token'] = '';
$wechat = new Wechat($options);
if(isset($_GET['echostr'])){
     $wechat->valid();  //检验signature代码
 }else{
 $request = $wechat->request();
 // 自动回复处理
 if($request['msgtype']=='event'){   //事件处理
    $openid = $request['fromusername'];
    if($request['event']=='subscribe'){ //关注事件

    }elseif($request['event']=='unsubscribe'){ //取消关注事件

    }elseif($request['event']=='SCAN'){  //扫码事件

    }elseif($request['event']=='CLICK'){ //菜单点击事件

    ｝
 }else if($request['msgtype']=='text'){  //文本回复

  }else if($request['msgtype']=='voice'){  //语音回复

 }
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3532d ago

### Community

Maintainers

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

---

Top Contributors

[![luoyt](https://avatars.githubusercontent.com/u/1060939?v=4)](https://github.com/luoyt "luoyt (13 commits)")

### Embed Badge

![Health badge](/badges/luoyt-wechat/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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