This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $botkey = "PUT BOT KEY HERE"; | |
| /*--------------------------------------------------------------*/ | |
| $input = file_get_contents("php://input"); // Retrieve information sent by webhook | |
| $sJ = json_decode($input, true); // decode JSON supplied by webhook to PHP array | |
| $ch = curl_init("https://api.telegram.org/bot" . $botkey . "/sendMessage"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class connector { | |
| private $process; | |
| private $pipes; | |
| private $core; | |
| public function __construct($core) { | |
| $this->core = $core; | |
| $cmd = "/opt/tg-bin/telegram-cli --json -k /opt/tg-bin/server.pub --disable-link-preview -I -R -C -N"; | |