To Keep things short I will give a brief explanation on how to create a bot in telegram.
Just talk to @BotFather in telegram, follow the instructions to create a bot and get the Bot ID and API KEY fro your bot.
paste the code in:
Server Events -> Global -> All Pages -> Global Code
// Sending Notifications to Telegram Bot
function SendBotMsg($ChatID, $MesgTxt){
$parameters=['parse_mode'=>"markdown", 'chat_id'=>$ChatID, 'text'=> $MesgTxt,];
$btToken="BOTID:API-KEY"; // Here you need to enter your Bot
$website="h**ps://api.telegram.org/bot".$btToken;
return file_get_contents($website . "/sendMessage?" . http_build_query($parameters));
}
Now you have a function for sending message in bot. You need chat Id for sending messages in bot.
It can be done by searching for your bot in find contacts and send message to Bot, then with this link get chat ID : h**ps://api.telegram.org/botBotID:APIKEY/getUpdates
We are ready now, Just use this to send a message:
SendBotMsg(ChatID, "*Your Message Here *".$rsold['ID']."\n any column info ".$Usr." user Info, anything");
thats it!
Hope this helps and add a lot of power to your project, it helped my project a lot.