我正在设计一个电报机器人。我想显示一些链接,例如
1-wkpviana
2- 通过主机托管
当用户点击它时,打开
http://wkpviana.net
http://vianahosting.ir
在浏览器中。我如何在 php 中创建它?我的部分代码是:
<?php
...
$sLink = "";
foreach($Links as $Row){
$sLink .= "<a href='".$Row->link_url."'>".$Row->link_name."</a>";
}
$Text = $sLink;
...
$URL = "https://api.telegram.org/bot".$Token."/sendMessage?chat_id=".$ChatID."&text=".$Text."&reply_markup=".json_encode($KB);
file_get_contents($URL);
?>