{"id":15026685,"url":"https://github.com/wechaty/php-wechaty-getting-started","last_synced_at":"2025-04-09T20:21:18.861Z","repository":{"id":102484362,"uuid":"281584890","full_name":"wechaty/php-wechaty-getting-started","owner":"wechaty","description":"PHP Wechaty Starter Project Template that Works Out-of-the-Box","archived":false,"fork":false,"pushed_at":"2021-11-24T08:41:17.000Z","size":95,"stargazers_count":8,"open_issues_count":4,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T22:13:00.610Z","etag":null,"topics":["chatbot","getting-started","php","php74","wechaty"],"latest_commit_sha":null,"homepage":"https://github.com/wechaty/docker-php-wechaty-getting-started","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wechaty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-07-22T05:36:56.000Z","updated_at":"2023-12-17T07:16:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"bb565902-37db-4a12-b6f6-41f986dc8f54","html_url":"https://github.com/wechaty/php-wechaty-getting-started","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Fphp-wechaty-getting-started","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Fphp-wechaty-getting-started/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Fphp-wechaty-getting-started/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Fphp-wechaty-getting-started/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wechaty","download_url":"https://codeload.github.com/wechaty/php-wechaty-getting-started/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248104254,"owners_count":21048307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","getting-started","php","php74","wechaty"],"created_at":"2024-09-24T20:04:53.277Z","updated_at":"2025-04-09T20:21:18.838Z","avatar_url":"https://github.com/wechaty.png","language":"Makefile","readme":"# php-wechaty-getting-started [![PHP Version](https://img.shields.io/packagist/v/wechaty/php-wechaty)](https://packagist.org/packages/wechaty/php-wechaty) [![PHP CI](https://github.com/wechaty/php-wechaty-getting-started/workflows/PHP%20CI/badge.svg)](https://github.com/wechaty/php-wechaty-getting-started/actions?query=workflow%3A%22PHP+CI%22)\n\n[![PHP Wechaty](https://wechaty.github.io/php-wechaty/images/php-wechaty.png)](https://github.com/wechaty/php-wechaty-getting-started)\n\nPHP Wechaty Starter Project Template that Works Out-of-the-Box\n \n[![Wechaty in PHP](https://img.shields.io/badge/Wechaty-PHP-blue)](https://github.com/wechaty/php-wechaty)\n\n## Connecting Chatbots\n\n[![Powered by Wechaty](https://img.shields.io/badge/Powered%20By-Wechaty-brightgreen.svg)](https://github.com/Wechaty/wechaty)\n[![PHP Version](https://img.shields.io/packagist/v/wechaty/php-wechaty)](https://packagist.org/packages/wechaty/php-wechaty)\n\nWechaty is a RPA SDK for Wechat **Individual** Account that can help you create a chatbot in 8 lines of PHP.\n\n## The World's Shortest PHP ChatBot: 8 lines of Code\n\n```php\n$wechaty = \\IO\\Github\\Wechaty\\Wechaty::getInstance($token, $endPoint);\n$wechaty-\u003eonScan(function($qrcode, $status, $data) {\n    $qr = \\IO\\Github\\Wechaty\\Util\\QrcodeUtils::getQr($qrcode);\n    echo \"$qr\\n\\nOnline Image: https://wechaty.github.io/qrcode/$qrcode\\n\";\n})-\u003eonLogin(function(\\IO\\Github\\Wechaty\\User\\ContactSelf $user) {\n})-\u003eonMessage(function(\\IO\\Github\\Wechaty\\User\\Message $message) {\n    $message-\u003esay(\"hello from PHP7.4\");\n})-\u003estart();\n```\n\n## Usage\n\n### Install\n\n```sh\n# Install make sure php is 7.4+\nsudo yum install php-pecl-grpc\nsudo yum install php-pecl-protobuf\nsudo yum install php-xml\n# curl -sS https://getcomposer.org/installer | php\nphp -r \"copy('https://install.phpcomposer.com/installer', 'composer-setup.php');\"\nphp composer-setup.php\nphp -r \"unlink('composer-setup.php');\"\nmv composer.phar /usr/local/bin/composer\n\nmake install\n```\n\n### Run\n\n```sh\nexport WECHATY_PUPPET_HOSTIE_TOKEN=your_token_at_here\n\nmake bot\n```\n\n#### New environment variables\n\n\u003c!-- markdownlint-disable MD013 --\u003e\n\n1. `WECHATY_PUPPET_SERVICE_TLS_CA_CERT`: can be overwrite by `options.tlsRootCert`. Set Root CA Cert to verify the server or client.\n\nFor Puppet Server:\n\n| Environment Variable | Options | Description |\n| -------------------- | ------- | ----------- |\n| `WECHATY_PUPPET_SERVICE_TLS_SERVER_CERT` | `options.tls.serverCert` | Server CA Cert (string data) |\n| `WECHATY_PUPPET_SERVICE_TLS_SERVER_KEY` | `options.tls.serverKey` | Server CA Key (string data) |\n| `WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER` | `options.tls.disable` | Set `true` to disable server TLS |\n\nFor Puppet Client:\n\n| Environment Variable | Options | Description |\n| -------------------- | ------- | ----------- |\n| `WECHATY_PUPPET_SERVICE_AUTHORITY` | `options.authority` | Service discovery host, default: `api.chatie.io` |\n| `WECHATY_PUPPET_SERVICE_TLS_CA_CERT` | `options.caCert` | Certification Authority Root Cert, default is using Wechaty Community root cert |\n| `WECHATY_PUPPET_SERVICE_TLS_SERVER_NAME` | `options.serverName` | Server Name (mast match for SNI) |\n| `WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_CLIENT` | `options.tls.disable` | Set `true` to disable client TLS |\n\n\u003e Learn more about tls at https://github.com/wechaty/puppet-service\n\n## Wechaty Getting Started in Multiple Languages\n\n- [TypeScript Wechaty Getting Started](https://github.com/wechaty/wechaty-getting-started)\n- [Python Wechaty Getting Started](https://github.com/wechaty/python-wechaty-getting-started)\n- [Java Wechaty Getting Started](https://github.com/wechaty/java-wechaty-getting-started)\n- [Go Wechaty Getting Started](https://github.com/wechaty/go-wechaty-getting-started)\n- [PHP Wechaty Getting Started](https://github.com/wechaty/php-wechaty-getting-started)\n- [.NET(C#) Wechaty Getting Started](https://github.com/wechaty/dotnet-wechaty-getting-started)\n\n## Badge\n\n[![Wechaty in PHP](https://img.shields.io/badge/Wechaty-PHP-blue)](https://github.com/wechaty/php-wechaty)\n\n```md\n[![Wechaty in PHP](https://img.shields.io/badge/Wechaty-PHP-blue)](https://github.com/wechaty/php-wechaty)\n```\n\n## Maintainers\n\n[@wechaty/php](https://github.com/orgs/wechaty/teams/php/members)\n\n## Copyright \u0026 License\n\n- Code \u0026 Docs © 2020 Wechaty Contributors \u003chttps://github.com/wechaty\u003e\n- Code released under the Apache-2.0 License\n- Docs released under Creative Commons\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwechaty%2Fphp-wechaty-getting-started","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwechaty%2Fphp-wechaty-getting-started","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwechaty%2Fphp-wechaty-getting-started/lists"}