我有电报机器人,我的机器人会发送带有QR码的欢迎信息。 用户ID生成的QR码。现在我有这个代码......
$botToken = "";
$website = "https://api.telegram.org/bot".$botToken;
$content = file_get_contents("php://input");
$update = json_decode($content, TRUE);
$message = $update["message"];
$chatId = $message["chat"]["id"];
$text = $message["text"];
if ($text == '/start') {
$welcomemessage = 'Добро пожаловать. Сохраните полученный id и введите его в приложение I am here: ';
file_get_contents($website."/sendmessage?chat_id=".$chatId."&text=".$welcomemessage);
file_get_contents($website."/sendmessage?chat_id=".$chatId."&text=".$chatId); // send QR picture will be here
}
可能是http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=a&chld=(user_id)