Opslagsindhold
<?php // _______________________________/// // ÷÷÷÷÷÷÷ FAST CODER ÷÷÷÷÷÷÷÷ /// // ÷÷÷÷÷÷÷÷ PHP TEAM ÷÷÷÷÷÷÷÷ /// // ÷÷÷÷÷÷÷ @Fast_Coder ÷÷÷÷÷÷÷ /// // ÷÷÷ @Rustam_Hikmatullayev ÷÷÷ /// // ______________________________/// define('API_KEY','1142:AAG38j1qHkQOQt-RhuULJoQsu835o'); $botuser = "@sevgi_test_bot"; $admin = "554834550"; function del($nomi){ array_map('unlink', glob("$nomi")); } function put($fayl,$nima){ file_put_contents("$fayl","$nima"); } function get($fayl){ $get = file_get_contents("$fayl"); return $get; } function ty($ch){ return bot('sendChatAction', [ 'chat_id' => $ch, 'action' => 'typing', ]); } function editMessageText( $chatId, $messageId, $text, $parseMode = null, $disablePreview = false, $replyMarkup = null, $inlineMessageId = null ) { return bot('editMessageText', [ 'chat_id' => $chatId, 'message_id' => $messageId, 'text' => $text, 'inline_message_id' => $inlineMessageId, 'parse_mode' => $parseMode, 'disable_web_page_preview' => $disablePreview, 'reply_markup' => $replyMarkup, ]); } function ACL($callbackQueryId, $text = null, $showAlert = false) { return bot('answerCallbackQuery', [ 'callback_query_id' => $callbackQueryId, 'text' => $text, 'show_alert'=>$showAlert, ]); } function bot($method,$datas=[]){ $url = "https://api.telegram.org/bot".API_KEY."/".$method; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); curl_setopt($ch,CURLOPT_POSTFIELDS,$datas); $res = curl_exec($ch); if(curl_error($ch)){ var_dump(curl_error($ch)); }else{ return json_decode($res); } } $update = json_decode(get('php://input')); $message = $update->message; $text = $message->text; $cid = $message->chat->id; $uid = $message->from->id; $fname = $message->from->first_name; $user = $message->from->username; $data = $message->contact; $nomer = $message->contact->phone_number; $name = $message->contact->first_name; $update = json_decode(file_get_contents('php://input')); $message = $update->message; $cid = $message->chat->id; $cidtyp = $message->chat->type; $miid = $message->message_id; $name = $message->chat->first_name; $user = $message->from->username; $tx = $message->text; $callback = $update->callback_query; $mmid = $callback->inline_message_id; $mes = $callback->message; $mid = $mes->message_id; $cmtx = $mes->text; $mmid = $callback->inline_message_id; $idd = $callback->message->chat->id; $cbid = $callback->from->id; $cbuser = $callback->from->username; $data = $callback->data; $ida = $callback->id; $cqid = $update->callback_query->id; $cbins = $callback->chat_instance; $cbchtyp = $callback->message->chat->type; $step = file_get_contents("step/$cid.step"); $menu = file_get_contents("step/$cid.menu"); $stepe = file_get_contents("step/$cbid.step"); $menue = file_get_contents("step/$cbid.menu"); mkdir("step"); $url = 'https://daryo.uz/feed/'; $rss = simplexml_load_file($url); foreach ($rss->channel->item as $item) { $line = $item->title; $link = $item->link; break; } $key = json_encode([ 'resize_keyboard'=>true, 'keyboard'=>[ [['text'=>"😍 Sevgi Test 😍"],['text'=>"👤 Admin 👤"]], [['text'=>"❓ Yordam ❓"],['text'=>"⤴️ Foydali Bo'lim ⤴️"]],[['text'=>"Kanalimiz"]], ] ]); $foydali = json_encode([ 'resize_keyboard'=>true, 'keyboard'=>[ [['text'=>"❄ Yangi Yil ❄"],['text'=>"🆕️ Yangiliklar 🆕️"]], ] ]); $back = json_encode([ 'resize_keyboard'=>true, 'keyboard'=>[ [['text'=>"🔙 Orqaga Qaytish"]], ] ]); if($text=="🔙 Orqaga Qaytish"){ bot('sendmessage',[ 'chat_id'=>$cid, 'text'=>"🏠 *Siz Bosh Menyudasiz* 🙄",