Coder Social home page Coder Social logo

work_weixin's Introduction

wechat

安装

环境要求:PHP >= 5.3.0

使用 composer

composer require "stoneworld/wechat:~2.0" -vvv

手动安装 下载 本安装包

然后引入根目录的autoload.php即可:

<?php

require "wechat/autoload.php"; // 路径请修改为你具体的实际路径

...
确认你没装 laravel-debugbar!!!!

使用

基本使用(以服务端为例):

<?php

use Stoneworld\Wechat\Server;

$options = array(
            'token'=>'stoneworld1992',   //填写应用接口的Token
            'encodingaeskey'=>'o1wze3492xoUVIc9ccTLJczO3BQ5pLfiHcKwtDEdqM9',//填写加密用的EncodingAESKey
            'appid'=>'wx8ac123b21f53dera7',  //填写高级调用功能的appid
            'appsecret'=>'4ZDHIETJ6e0oENlEkRhYwdKcPcRjCkgQkuHtQTJ12ZhWHESowrJqS9', //填写高级调用功能的密钥
            'agentid'=>'5', //应用的id
        );

$server = new Server($options);

$server->on('message', function($message){
    return "您好!";
});

// 您可以直接echo 或者返回给框架
echo $server->server();

更多请参考文档wiki

致谢

特别感谢超哥 安正超 @overtrue 的 EasyWeChat 微信 SDK 为企业微信 SDK 开发带来的指引。

License

MIT

work_weixin's People

Contributors

freyo avatar insua avatar skipify avatar stoneworld avatar xieyongfa123 avatar xjdata avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.