Giter Site home page Giter Site logo

kuustudio / php-wechaty-getting-started Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wechaty/php-wechaty-getting-started

0.0 1.0 0.0 92 KB

PHP Wechaty Starter Project Template that Works Out-of-the-Box

License: Apache License 2.0

Dockerfile 52.58% Makefile 47.42%

php-wechaty-getting-started's Introduction

php-wechaty-getting-started PHP Version PHP CI

PHP Wechaty

PHP Wechaty Starter Project Template that Works Out-of-the-Box

Wechaty in PHP

Connecting Chatbots

Powered by Wechaty PHP Version

Wechaty is a RPA SDK for Wechat Individual Account that can help you create a chatbot in 8 lines of PHP.

The World's Shortest PHP ChatBot: 8 lines of Code

$wechaty = \IO\Github\Wechaty\Wechaty::getInstance($token, $endPoint);
$wechaty->onScan(function($qrcode, $status, $data) {
    $qr = \IO\Github\Wechaty\Util\QrcodeUtils::getQr($qrcode);
    echo "$qr\n\nOnline Image: https://wechaty.github.io/qrcode/$qrcode\n";
})->onLogin(function(\IO\Github\Wechaty\User\ContactSelf $user) {
})->onMessage(function(\IO\Github\Wechaty\User\Message $message) {
    $message->say("hello from PHP7.4");
})->start();

Usage

Install

# Install make sure php is 7.4+
sudo yum install php-pecl-grpc
sudo yum install php-pecl-protobuf
sudo yum install php-xml
# curl -sS https://getcomposer.org/installer | php
php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar /usr/local/bin/composer

make install

Run

export WECHATY_PUPPET_HOSTIE_TOKEN=your_token_at_here

make bot

Wechaty Getting Started in Multiple Languages

Badge

Wechaty in PHP

[![Wechaty in PHP](https://img.shields.io/badge/Wechaty-PHP-blue)](https://github.com/wechaty/php-wechaty)

Maintainers

@wechaty/php

Copyright & License

  • Code & Docs © 2020 Wechaty Contributors https://github.com/wechaty
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons

php-wechaty-getting-started's People

Contributors

zhangchunsheng avatar huan avatar

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.