基于 xbot 实现微信消息类型监听并转发
项目链接
https://github.com/xbot-org/demo_forward_msg
使用
先配置好 xbot 的配置如下,并运行
CALLBACK_URL=http://127.0.0.1:5678
SECRET=xxx
PORT=5557
clone 代码
git clone https://github.com/xbot-org/demo_keyword_reply.git
cd demo_keyword_reply
运行此服务 php -S localhost:5678
代码
代码很简单,这里贴一下
<?php
$jsonString = file_get_contents("php://input");
$msg = json_decode($jsonString, true);
switch ($msg['type']) {
case 'MT_RECV_VIDEO_MSG':
//