我用setwebhook方法设置了webhook my telegram bot,但是当我在bot中发送消息时,请不要在我的URL中使用它。我设置了我的电报bot webhook,但不要发送电报。为什么?
https://api.telegram.org/bot<token>/setwebhook?url=https://www.example.com/bot/temp.php
在我的主机我使用PHP语言进行分析和回答。我用这个命令从bot获取更新。
$update = file_get_contents(“php://input”);
但是在运行这条线之后$ update是空的。 我没有问题,没有setwebhook机器人更新时,我使用webhook不采取数据。
结果运行getWebhookinfo是:
{"ok":true,"result":{"url":"https://example.com/bot/temp.php","has_custom_certificate":false,"pending_update_count":0,"max_connections":40}}
我必须是真正的 “has_custom_cere”? 感谢您的帮助
SSL/TLS1.2被接受电报有我的托管。 – mohammad
我还没有任何PHP errore – mohammad
好的和'/ getwebhookinfo'says? – creyD