PHP code example of wow-php / e-wechat-sdk
1. Go to this page and download the library: Download wow-php/e-wechat-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wow-php / e-wechat-sdk example snippets
tests/test.php
riseWeChat\Token;
use Wow\EnterpriseWeChat\Messages\Text;
$token = (new Token('企业ID'))
->setAgentId('应用ID')
->setCorpSecret('应用安全码')
->getAccessToken();
$result = (new Text())
->setToken($token)
->setAgentId('应用ID')
->setUsers(['用户1', '用户2'])
->setMessage("测试消息, 更多请<a href='http://demo.cssmoban.com/cssthemes5/twts_51_unapp/index.html'>点击</a>查看")
->send();
var_dump($result);