1. Go to this page and download the library: Download teh9/apigram 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/ */
$chatId = 1;
$apigram = new \Teh9\Apigram\Client\TelegramClient('BOT_API_TOKEN');
$response = $apigram->messages()->to($chatId)->send('text');
$response->getMessageId(); // Get message id
$chatId = 1;
$apigram = new \Teh9\Apigram\Client\TelegramClient('BOT_API_TOKEN');
$response = $apigram->messages()->edit('TELEGRAM_CHAT_ID', 'MESSAGE_ID', 'lorem ipsum new text');
var_dump($response->getMessageText()); // lorem ipsum new text