基于 xbot 实现微信关键词自动回复
项目链接
https://github.com/xbot-org/demo_keyword_reply
使用
先配置好 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']) {