我创建了一个 php 电报船。在这种情况下,我会将用户 ID 存储在 id.txt 文件中。
$message = $update->message;
$text1 = $message->text;
$fadmin = $message->from->id;
$baza = file_get_contents("id.txt");
$saqla2 = "$baza\n$fadmin";
file_put_contents("id.txt", $saqla2);
那么如何向每个注册用户发送消息?因此,您需要向所有少数民族发送信息。
$text2 = str_replace("/xabar","",$text1);
$response = file_get_contents("https://api.telegram.org/bot".API_KEY."/sendMessage?chat_id= //there all user id from $baza // &text=$text2");