mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-11-30 04:19:13 +01:00
Readme update & composer.lock update
This commit is contained in:
parent
0a952cba3e
commit
7e41c521f0
45
README.md
45
README.md
@ -14,39 +14,26 @@ Fast, simple, async php telegram client and parser:
|
|||||||
|
|
||||||
1. Get app_id and app_hash at [my.telegram.org](https://my.telegram.org/)
|
1. Get app_id and app_hash at [my.telegram.org](https://my.telegram.org/)
|
||||||
1. Swoole extension required: [Install swoole](https://github.com/swoole/swoole-src#%EF%B8%8F-installation)
|
1. Swoole extension required: [Install swoole](https://github.com/swoole/swoole-src#%EF%B8%8F-installation)
|
||||||
1. Install this package:
|
1. `composer install` to install required libs
|
||||||
|
1. Create .env from .env.example
|
||||||
|
1. Fill variables in .env
|
||||||
|
|
||||||
a. Standalone:
|
_Optional:_
|
||||||
|
1. Use supervisor to monitor and restart swoole servers. Example of `/etc/supervisor/conf.d/telegram_rss.conf`:
|
||||||
1. download files from github and extract.
|
```
|
||||||
2. Run `composer install` inside unpacked directory
|
[program:telegram_client]
|
||||||
|
command=/usr/bin/php /home/admin/web/tg.i-c-a.su/TelegramSwooleClient/server.php
|
||||||
b. Existing project:
|
numprocs=1
|
||||||
|
directory=/home/admin/web/tg.i-c-a.su/TelegramSwooleClient/
|
||||||
1. Add following into your project's composer.json
|
autostart=true
|
||||||
```
|
autorestart=true
|
||||||
"repositories": [
|
nodaemon=true
|
||||||
{
|
logfile=/dev/null
|
||||||
"type": "git",
|
logfile_maxbytes=0
|
||||||
"url": "https://github.com/danog/phpseclib"
|
```
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/xtrime-ru/TelegramSwooleClient.git"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"require": {
|
|
||||||
"xtrime-ru/telegramswooleclient": "dev-master",
|
|
||||||
"amphp/dns": "dev-master#861cc857b1ba6e02e8a7439c30403682785fce96 as 0.9.9",
|
|
||||||
"amphp/file": "dev-master#5a69fca406ac5fd220de0aa68c887bc8046eb93c as 0.3.3",
|
|
||||||
"amphp/uri": "dev-master#f3195b163275383909ded7770a11d8eb865cbc86 as 0.1.3"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**Usage**
|
**Usage**
|
||||||
|
|
||||||
1. Install
|
|
||||||
1. Fill options in .env file (see .env.example)
|
|
||||||
1. Run server/parser
|
1. Run server/parser
|
||||||
```
|
```
|
||||||
php server.php [--help] [-a|--address=127.0.0.1] [-p|--port=9503]
|
php server.php [--help] [-a|--address=127.0.0.1] [-p|--port=9503]
|
||||||
|
89
composer.lock
generated
89
composer.lock
generated
@ -193,12 +193,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/amphp/dns.git",
|
"url": "https://github.com/amphp/dns.git",
|
||||||
"reference": "1ccd6337f72107ba422ae72a5812687739d214c8"
|
"reference": "ecb423be02e6db60f01bb39d0ab46c0702be8ba0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/amphp/dns/zipball/1ccd6337f72107ba422ae72a5812687739d214c8",
|
"url": "https://api.github.com/repos/amphp/dns/zipball/ecb423be02e6db60f01bb39d0ab46c0702be8ba0",
|
||||||
"reference": "1ccd6337f72107ba422ae72a5812687739d214c8",
|
"reference": "ecb423be02e6db60f01bb39d0ab46c0702be8ba0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -261,7 +261,7 @@
|
|||||||
"dns",
|
"dns",
|
||||||
"resolve"
|
"resolve"
|
||||||
],
|
],
|
||||||
"time": "2019-01-25T04:12:31+00:00"
|
"time": "2019-03-03T15:12:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "amphp/file",
|
"name": "amphp/file",
|
||||||
@ -269,12 +269,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/amphp/file.git",
|
"url": "https://github.com/amphp/file.git",
|
||||||
"reference": "94f772bd7a438fcc46984b0075155c8eda7284af"
|
"reference": "654596edeb2255277d21049c852c3eed886659c2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/amphp/file/zipball/94f772bd7a438fcc46984b0075155c8eda7284af",
|
"url": "https://api.github.com/repos/amphp/file/zipball/654596edeb2255277d21049c852c3eed886659c2",
|
||||||
"reference": "94f772bd7a438fcc46984b0075155c8eda7284af",
|
"reference": "654596edeb2255277d21049c852c3eed886659c2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -327,7 +327,7 @@
|
|||||||
"non-blocking",
|
"non-blocking",
|
||||||
"static"
|
"static"
|
||||||
],
|
],
|
||||||
"time": "2019-01-07T17:38:45+00:00"
|
"time": "2019-03-01T16:38:57+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "amphp/http",
|
"name": "amphp/http",
|
||||||
@ -546,16 +546,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "amphp/process",
|
"name": "amphp/process",
|
||||||
"version": "v1.0.3",
|
"version": "v1.1.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/amphp/process.git",
|
"url": "https://github.com/amphp/process.git",
|
||||||
"reference": "e7e28219da753f865f9055e87d0b9b110ea607ba"
|
"reference": "355b1e561b01c16ab3d78fada1ad47ccc96df70e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/amphp/process/zipball/e7e28219da753f865f9055e87d0b9b110ea607ba",
|
"url": "https://api.github.com/repos/amphp/process/zipball/355b1e561b01c16ab3d78fada1ad47ccc96df70e",
|
||||||
"reference": "e7e28219da753f865f9055e87d0b9b110ea607ba",
|
"reference": "355b1e561b01c16ab3d78fada1ad47ccc96df70e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -574,7 +574,7 @@
|
|||||||
"Amp\\Process\\": "lib"
|
"Amp\\Process\\": "lib"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"lib/constants.php"
|
"lib/functions.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
@ -597,11 +597,11 @@
|
|||||||
],
|
],
|
||||||
"description": "Asynchronous process manager.",
|
"description": "Asynchronous process manager.",
|
||||||
"homepage": "https://github.com/amphp/process",
|
"homepage": "https://github.com/amphp/process",
|
||||||
"time": "2019-01-15T21:42:43+00:00"
|
"time": "2019-02-26T16:33:03+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "amphp/socket",
|
"name": "amphp/socket",
|
||||||
"version": "v0.10.11",
|
"version": "v0.10.x-dev",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/amphp/socket.git",
|
"url": "https://github.com/amphp/socket.git",
|
||||||
@ -772,18 +772,19 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/amphp/websocket.git",
|
"url": "https://github.com/amphp/websocket.git",
|
||||||
"reference": "658ed08346757ca598f73e60329c272dfd83ee90"
|
"reference": "c367bcf5a874fb5a42e856ce95d44cd6e9096f19"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/amphp/websocket/zipball/658ed08346757ca598f73e60329c272dfd83ee90",
|
"url": "https://api.github.com/repos/amphp/websocket/zipball/c367bcf5a874fb5a42e856ce95d44cd6e9096f19",
|
||||||
"reference": "658ed08346757ca598f73e60329c272dfd83ee90",
|
"reference": "c367bcf5a874fb5a42e856ce95d44cd6e9096f19",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"amphp/amp": "^2",
|
"amphp/amp": "^2",
|
||||||
"amphp/byte-stream": "^1.5",
|
"amphp/byte-stream": "^1.5",
|
||||||
"amphp/socket": "^0.10",
|
"amphp/socket": "^0.10",
|
||||||
|
"cash/lrucache": "^1.0",
|
||||||
"php": ">=7.1"
|
"php": ">=7.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
@ -800,7 +801,6 @@
|
|||||||
"Amp\\Websocket\\": "src"
|
"Amp\\Websocket\\": "src"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"src/constants.php",
|
|
||||||
"src/functions.php"
|
"src/functions.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -831,7 +831,7 @@
|
|||||||
"non-blocking",
|
"non-blocking",
|
||||||
"websocket"
|
"websocket"
|
||||||
],
|
],
|
||||||
"time": "2019-02-17T20:28:54+00:00"
|
"time": "2019-03-03T14:35:07+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "amphp/websocket-client",
|
"name": "amphp/websocket-client",
|
||||||
@ -943,6 +943,47 @@
|
|||||||
"description": "Windows Registry Reader.",
|
"description": "Windows Registry Reader.",
|
||||||
"time": "2018-10-24T03:34:54+00:00"
|
"time": "2018-10-24T03:34:54+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "cash/lrucache",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/cash/LRUCache.git",
|
||||||
|
"reference": "4fa4c6834cec59690b43526c4da41d6153026289"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/cash/LRUCache/zipball/4fa4c6834cec59690b43526c4da41d6153026289",
|
||||||
|
"reference": "4fa4c6834cec59690b43526c4da41d6153026289",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"cash": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Cash Costello",
|
||||||
|
"email": "cash.costello@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "An efficient memory-based Least Recently Used (LRU) cache",
|
||||||
|
"homepage": "https://github.com/cash/LRUCache",
|
||||||
|
"keywords": [
|
||||||
|
"cache",
|
||||||
|
"lru"
|
||||||
|
],
|
||||||
|
"time": "2013-09-20T18:59:12+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "danog/madelineproto",
|
"name": "danog/madelineproto",
|
||||||
"version": "dev-master",
|
"version": "dev-master",
|
||||||
@ -1771,12 +1812,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/rollbar/rollbar-php.git",
|
"url": "https://github.com/rollbar/rollbar-php.git",
|
||||||
"reference": "8fd1e4d2f3e2ba7ed746df3f2d3bcd5cb755f9b3"
|
"reference": "b1b33ae00f0d3f28d351552a85a367a425456ad7"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/rollbar/rollbar-php/zipball/8fd1e4d2f3e2ba7ed746df3f2d3bcd5cb755f9b3",
|
"url": "https://api.github.com/repos/rollbar/rollbar-php/zipball/b1b33ae00f0d3f28d351552a85a367a425456ad7",
|
||||||
"reference": "8fd1e4d2f3e2ba7ed746df3f2d3bcd5cb755f9b3",
|
"reference": "b1b33ae00f0d3f28d351552a85a367a425456ad7",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1822,7 +1863,7 @@
|
|||||||
"logging",
|
"logging",
|
||||||
"monitoring"
|
"monitoring"
|
||||||
],
|
],
|
||||||
"time": "2019-01-24T13:36:35+00:00"
|
"time": "2019-03-04T08:56:09+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
|
Loading…
Reference in New Issue
Block a user