1. Go to this page and download the library: Download alikm6/php-telegram-bot 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/ */
$options = [
'send_error' => true, // If set to true, errors will be sent to the specified chat ID as a Telegram message.
'run_in_background' => false, // If set to true, requests will be processed in the background and responses will not be returned to the caller.
'return' => 'result_array', // The type of result to return from API requests.
];