G
G
Galkoff2016-03-22 11:52:06
PHP
Galkoff, 2016-03-22 11:52:06

Why do events fire twice in webhook telegram bot?

webhook installed. The script executes the following code:

$content = file_get_contents("php://input");

file_put_contents('log.txt', date('H:m:i d-m-Y') . ' — ' . $content . PHP_EOL, FILE_APPEND | LOCK_EX);
die();

After sending a message to the bot, 2 events come to log.txt, i.e. the script is executed twice.
Because of what it can be?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question