Coder Social home page Coder Social logo

swoole-bot's Introduction

1. 简介

  • 项目原理: 模拟微信网页版登录,如果网页版本没有的功能,这个项目项目也是无能为力的
  • 该项目主要目的想利用swoole,增强原生PHP cli的能力
  • 直接使用hanson/vbot库,swoole-bot只是增加swoole版本的入口,这样有利用新功能迭代
  • 已经支持多用户登录,修改Proccess.php 的$workNum可以控制默认启动进程数
  • 自动监控子进程,意外退出后会自动恢复,保证服务稳定性
  • 目前没考虑修改原作者的底层封装,后期可考虑用swoole task提高性能

2. 安装

2.1环境要求

  • PHP >= 7.0
  • swoole >= 1.8.9

2.2 安装方式

  • composer
composer require kcloze/swoole-bot
  • git
git clone https://github.com/kcloze/swoole-bot.git
cd swoole-bot
composer install

2.3 管理服务

chmod u+x server.sh
./server.sh start|stop|restart

2.3 配置nginx,访问登录二维码

  • 配置nginx访问,根目录为:swoole-bot/log/session,必须添加autoindex选项,qr.png为扫描登录的二维码
        root   /data/www/swoole-bot/log/session;
        index  index.html index.htm index.php;
        autoindex on;

  • 浏览器访问:localhost,在点击随机生成的目录下的图片(注意选择日期最新的目录,每次过期会重新生成session目录)
  • 手机扫码登录

3. 体验demo

  • 微信添加微信好友:ysrg2014
  • 输入验证关键字:666
  • 对话输入自己想说的话,微信机器人机会跟您聊天了

效果截图1

4. 文档

详细文档

5. 参考项目

hanson/vbot

6. 感谢

hanson/vbot

7. QQ群

  • 141059677

swoole-bot's People

Watchers

 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.