?php $TOKEN = "7479877807:AAEj1q1o73JDxza7uGP6KQCGhdC304WoRRI"; $API = "https://api.telegram.org/bot$TOKEN/"; $update = json_decode(file_get_contents("php://input"), true); function send($id, $msg, $kb = null){ global $API; file_get_contents($API."sendMessage?chat_id=$id&text=".urlencode($msg)."&reply_markup=".json_encode($kb)); } if(isset($update["message"])){ $chat_id = $update["message"]["chat"]["id"]; $text = $update["message"]["text"]; if($text == "/start"){ send($chat_id, "๐Ÿš– Milliy Taxi ๐Ÿ‘ค Dispetcher: /zakaz ๐Ÿš• Haydovchi: zakaz kuting"); } if($text == "/zakaz"){ send($chat_id, "๐Ÿงพ Yangi zakaz ๐Ÿ“ Bulungโ€˜ur โ†’ Samarqand ๐Ÿ“ž Tel: 90 123 45 67", [ "inline_keyboard" => [ [ ["text"=>"โœ… Qabul qilaman","callback_data"=>"take"] ] ] ]); } } if(isset($update["callback_query"])){ $cid = $update["callback_query"]["message"]["chat"]["id"]; $name = $update["callback_query"]["from"]["first_name"]; send($cid,"๐Ÿš• Zakazni $name oldi"); } ?>