First, let’s write the main code that will determine the sending and receiving of requests from the telegram servers:
<?php
$data = file_get_contents('php://input');
$data = json_decode($data, true);
if (empty($data['message']['chat']['id'])) {
exit();
}
define('