P
P
prolige2021-03-22 12:55:50
PHP
prolige, 2021-03-22 12:55:50

Is there a library for sending messages to telegram by id?

Hello everyone, please advise a library (php) for sending messages by user id, madelineproto - not suitable, does not send messages to everyone

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad, 2021-03-22
@thoozu

Why use an entire library when it's all done in one request?

$request = [
  "chat_id" => $chat_id, // ID пользователя
  "text" => $message, // Текст сообщения
  "parse_mode" => "markdown"
];

file_get_contents("https://api.telegram.org/bot" . $bot_token . "/sendMessage?" . http_build_query($request));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question