How to add button with link Telegram?

Hi. I need to message to add a button-url. How to do it?

message_to_telegram function($text)
{
 $ch = curl_init();
curl_setopt_array(
$ch,
array(
 CURLOPT_URL => 'https://api.telegram.org/bot' . TELEGRAM_TOKEN . '/sendMessage',
 CURLOPT_POST => TRUE,
 CURLOPT_RETURNTRANSFER => TRUE,
 CURLOPT_TIMEOUT => 10,
 CURLOPT_POSTFIELDS => array(
 'chat_id' => TELEGRAM_CHATID,
 'text' => $text,
),
)
);
curl_exec($ch);
}
April 19th 20 at 12:46
1 answer
April 19th 20 at 12:48
$keyboard = [
 'inline_keyboard' => [
[
 "text": "Link",
 "url": "https://my_site"
]
]
];

...

CURLOPT_POSTFIELDS => array(
 'chat_id' => TELEGRAM_CHATID,
 'text' => $text,
 'reply_markup' => json_encode($keyboard);
),

...

Find more questions by tags TelegramPHP