An open API service indexing awesome lists of open source software.

https://github.com/frehaiku/wechatapi

A common wechat package,including The Individual Subscription Account implements【个人订阅号微信开发接口轮子】
https://github.com/frehaiku/wechatapi

wechat-framework wechat-sdk

Last synced: about 1 year ago
JSON representation

A common wechat package,including The Individual Subscription Account implements【个人订阅号微信开发接口轮子】

Awesome Lists containing this project

README

          

# wechatAPI

> A common wechat package,including basic The Individual Subscription Account implements

## Install

```bash
git clone https://github.com/frehaiku/wechatAPI.git

cd wechatAPI

# copy WechatSubscribedAccountSDK.class.php to your project
```

## Usage

```php
include_once "WechatSubscribedAccountSDK.class.php"
$wechat = new WechatSubscribedAccountSDK();
$wechat->checkSignature();

$type = $wechat->getMsg()->getRecType();
switch($type) {
case WechatSubscribedAccountSDK::MSGTEXT:
$wechat->text('reply to you')->reply();
break;
case WechatSubscribedAccountSDK::MSGEVENT:
// ...
break;
}
```

## Lisence

MIT