From 3104d4434d3e25c1845fe8d15770275cc31da120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C=20=D0=91=D0=B0=D1=80=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Mon, 27 Sep 2021 11:47:11 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BB(=D0=B0)=20?= =?UTF-8?q?'PHP=20Send=20Message=20to=20Synology=20Chat.'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PHP-Send-Message-to-Synology-Chat..md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 PHP-Send-Message-to-Synology-Chat..md diff --git a/PHP-Send-Message-to-Synology-Chat..md b/PHP-Send-Message-to-Synology-Chat..md new file mode 100644 index 0000000..1be8b78 --- /dev/null +++ b/PHP-Send-Message-to-Synology-Chat..md @@ -0,0 +1,18 @@ +```php + 'SYNO.Chat.External', + 'method' => 'incoming', + 'version' => 2, + 'token' => 'bvogni9XyNBRjQmIjmrEXZ92J6JttDJNciJCWJaoBj6So9SpS44BC8vEjE7GR70Y', + 'payload' => json_encode(['text'=>$message]), + ]; + $link = 'https://likom.myds.me/chat/webapi/entry.cgi?'; + return file_get_contents($link.http_build_query($options)); +} + +if (isset($_GET['m'])) { + echo sendBot($_GET['m']); +} +``` \ No newline at end of file