Telegram Bot with Url InlineKeyboardButton for PHP
Solution:
<?php
$token = '11345342......';
$keyboard = json_encode([
"inline_keyboard" => [
[
[
"text" => "Button 1",
"callback_data" => "1"
],
[
"text" => "Button 2",
"callback_data" => "2"
]
]
]
]);
$data = http_build_query([
'text' => 'your message here',
'chat_id' => '@channelname'
]);
$url = "https://api.telegram.org/bot$token/sendMessage?{$data}&reply_markup={$keyboard}";
$res = @file_get_contents($url);

Answer
Solution:
$token = "Your Token";
$chatID = "Your Chat iD";
$reply = "Message";
$keyboard = array(
"inline_keyboard" => array(array(array("text" => "Your Buton Name", "url" => "Your Url")))
);
$keyboard = json_encode($keyboard, true);
$sendto = "https://api.telegram.org/bot$token/sendmessage?chat_id=".$chatID."&text=".$reply."&parse_mode=HTML&reply_markup=".$keyboard;
file_get_contents($sendto);
Source