Answer the question
In order to leave comments, you need to log in
How to make a closed Telegram bot?
Hello, I want to attach a telegram bot only for administrators to the site, so that when trying to enter the site with incorrect data, the bot would write a message to the site administrators, the message itself is sent like this (everything works):
$token = "хххххххххххххххххх";
$chat_id = "ххххххх";
$message .= "Неудачная попытка авторизации на сайте с использованием неверного пароля.\r\n Дата: {$_TIME}\r\n IP: {$_IP}\r\n Логин: '".$db->safesql($member_id['name'])."' ";
$sendToTelegram = file_get_contents("https://api.telegram.org/bot{$token}/sendMessage?chat_id={$chat_id}&parse_mode=html&text={$message}&parse_mode=HTML&disable_web_page_preview=false&disable_notification=false");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question