机器人无法工作,因为Telegram已在伊朗被过滤。
我使用:
$url = "https://api.telegram.org/bot".BOT_TOKEN."/SendMessage?chat_id=id&text=test";
file_get_contents("$url");
但它返回:bool(false)
这个块是在ISP级别实现的,所以它会影响所有脚本以及Telegram本身。
这是为伊朗人解决这个问题的教程。它使用bypass
到google script
:
https://www.chatted.ir/posts/telegrambot-for-iran-hosting.html