frehaiku / wechatAPI

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wechatAPI

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

Install

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

cd wechatAPI

# copy WechatSubscribedAccountSDK.class.php to your project

Usage

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

About

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

License:MIT License


Languages

Language:PHP 100.0%