1. Go to this page and download the library: Download toropyga/telegram library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
toropyga / telegram example snippets
use \FYN\Base;
$net = new FYN\NetContent();
$telegram = new FYN\Telegram($net);
$webhook_url = 'https://your_server_path'; // адрес Webhook-сервера
$certificate = '/home/user/ssl/my_ssl'; // путь к персональному сертификату (необязательный параметр)
$ip_address = '000.000.000.000'; // IP-адрес , который будет использоваться для отправки запросов Webhook вместо IP-адреса, полученного через DNS (необязательный параметр)
$max_connections = 40; // максимальное количество одновременных подключений к Webhook-серверу [1-100] (необязательный параметр)
$telegram->setWebhook ($webhook_url, $certificate, $ip_address, $max_connections);