$reply_key, 'resize_keyboard'=>true, 'one_time_keyboard'=>false ]; switch ($text){ case "/start" : show_menu(); break; case $key1 : send_message(); break; case $key2 : send_photo(); break; case $key3 : send_video(); break; case $key4 : send_music(); break; case $key5 : send_location(); break; case $key6 : send_contact(); break; case $key7 : send_file(); break; } function show_menu(){ $json_keyboard = json_encode($GLOBALS['reply_key_option']); $reply = "Hi Boss, Welcome.\nChoose an Option:"; $url = $GLOBALS['bot_url']."/sendMessage"; $post_params = [ 'chat_id'=>$GLOBALS['chat_id'], 'text'=>$reply, 'reply_markup'=>$json_keyboard ]; sendReply($url, $post_params); } function send_message(){ $reply = "Nam Nam Nam"; $url = $GLOBALS['bot_url']."/sendMessage"; $post_params = [ 'chat_id'=>$GLOBALS['chat_id'], 'text'=>$reply ]; sendReply($url, $post_params); } function send_photo(){ $url = $GLOBALS['bot_url']."/sendPhoto"; $post_params = [ 'chat_id'=>$GLOBALS['chat_id'], 'photo'=>new CURLFILE(realpath('2024-07-18 (2).png')), 'caption'=>'huhk', ]; sendReply($url, $post_params); } function send_video(){ $url = $GLOBALS['bot_url']."/sendVideo"; $post_params = [ 'chat_id'=>$GLOBALS['chat_id'], 'video'=>new CURLFILE(realpath('2025-06-07 03-35-25.mkv')), 'caption'=>'tffht', ]; sendReply($url, $post_params); } function send_music(){ $url = $GLOBALS['bot_url']."/sendAudio"; $post_params = [ 'chat_id'=>$GLOBALS['chat_id'], 'audio'=>new CURLFILE(realpath('naruto_shippuden_loneliness_trap_remix.mp3')), 'caption'=>'https://t.me/the_revenantsbot', 'title'=>'Loneliness', 'performer'=>'Naruto Shippuden' ]; sendReply($url, $post_params); } function send_location(){ $url = $GLOBALS['bot_url']."/sendLocation"; $post_params = [ 'chat_id'=>$GLOBALS['chat_id'], 'latitude'=>35.730199, 'longitude'=>51.3555777, ]; sendReply($url, $post_params); } function send_file(){ $url = $GLOBALS['bot_url']."/sendDocument"; $post_params = [ 'chat_id'=>$GLOBALS['chat_id'], 'document'=>new CURLFILE(realpath('download.jfif')), 'caption'=>'ssg', ]; sendReply($url, $post_params); } function send_contact(){ $url = $GLOBALS['bot_url']."/sendContact"; $post_params = [ 'chat_id'=>$GLOBALS['chat_id'], 'phone_number'=>989336889861, 'first_name'=>'Iman', 'last_name'=>'Malekan' ]; sendReply($url, $post_params); } ?>