$data = [
'text' => 'your message here',
'chat_id' => '@channelname'
];
file_get_contents("https://api.telegram.org/bot$token/sendMessage?" . http_build_query($data));
I can send messages this way, but I want to dynamically put a button(link) in it. How can I do?
2
Answers