<?php
function send_tele($msg) {
    global $api_key, $admin_id;
    $url = "https://api.telegram.org/bot".$api_key."/sendMessage";
    $data = [
        'chat_id' => $admin_id,
        'text' => $msg,
        'parse_mode' => 'markdown'
    ];
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_exec($ch);
    curl_close($ch);
}
?>