Answer the question
In order to leave comments, you need to log in
Telegram Webhook does not send requests to an address with HTTPS (code attached), what's the problem?
1. Made the bot right
2. Linked the Webhook correctly to the address on a free hosting, but with SSL: https://DOMAINNAME.c9.io/Apimaster/1.php
3. Code 1.php:
$datas = json_decode(file_get_contents("php://input"),true);
$bot = new \TelegramBot\Api\BotApi('123**************:****************************');
$messageText3='lalala';
$chatId=НОМЕР;
$bot->sendMessage($chatId, $messageText3);
Answer the question
In order to leave comments, you need to log in
Something like this.
SELECT u.* FROM users
LEFT JOIN purchases pur ON pur.user_id = u.id
LEFT JOIN products p ON p.id = pr.product_id
WHERE p.id IN (1,2,3)
Well, you would save somewhere for yourself what comes in file_get_contents("php://input")
with a single message.
There comes a structure
{
"update_id":137806900,
"message":{
"message_id":553,
"from":{
"id":331953,
"first_name":"Дмитрий",
"last_name":"Энтелис",
"username":"dentelis"
},
"chat":{
"id":331953,
"first_name":"Дмитрий",
"last_name":"Энтелис",
"username":"dentelis"
},
"date":1439369724,
"text":"!!!"
}
}
Try to do, by analogy, with this example: blizzy.ru/telegram/razmesaem-bota-na-platforme-heroku Maybe it's not the certificate.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question