Forwarded from โ ๐๐ฎ๐ณ๐ข๐ค๐ ๐๐ ๐๐ ๐ง
Please open Telegram to view this post
VIEW IN TELEGRAM
๐ณ1
Forwarded from โ ๐๐ฎ๐ณ๐ข๐ค๐ ๐๐ ๐๐ ๐ง
Yaqinlarimiz
@UPhoto360Bot ga kirib bu imkoniyatlarga oสปzingiz guvoh boสปling
๐ @UPhoto360Bot
Please open Telegram to view this post
VIEW IN TELEGRAM
Mashkalarga eslatma
Yolg'onchilarga lanat bo'lsin
Albatta Robbing kuzatib turguvchidir
Adolat uchun sobit turing.
Odamlar orasida adolat ila hukm qiling.
Adolatli guvoh bo'ling.
โMol (va boylik)laringizni oโrtalaringizda botil (yoโllar) bilan yemangiz! Shuningdek, bila turib, odamlarning haqlaridan bir qismini gunoh yoโli bilan yeyish (oโzlashtirish) maqsadida uni hokimlarga havola etmangiz!โ (Baqara surasi, 188-oyat
Please open Telegram to view this post
VIEW IN TELEGRAM
<?php
if(!empty($update->message->audio)){
$file = true;
$file_id = $update->message->audio->file_id;
$doc_f = $update->message->audio->title." - ".$update->message->audio->performer;
$doc_s = $update->message->audio->file_size;
}
if(!empty($update->message->video)){
$file = true;
$file_id = $update->message->video->file_id;
$doc_s = $update->message->video->file_size;
}
if(!empty($update->message->voice)){
$file = true;
$file_id = $update->message->voice->file_id;
$doc_s = $update->message->voice->file_size;
}
if(!empty($update->message->video_note)){
$file = true;
$file_id = $update->message->video_note->file_id;
$doc_s = $update->message->video_note->file_size;
}
if($file){
$wait = bot('sendSticker',[
'chat_id'=>$cid,
'sticker'=>$sticker,
'parse_mode'=>"html",
'disable_web_page_preview'=>true,
'reply_to_message_id'=>$message->message_id,
])->result->message_id;
$file_info = json_decode(file_get_contents("https://api.telegram.org/bot".API_KEY."/getFile?file_id=$file_id"), true);
$file_path = $file_info["result"]["file_path"];
$audio_url = "https://api.telegram.org/file/bot".API_KEY."/$file_path";
bot('deleteMessage',[
'chat_id'=>$cid,
'message_id'=>$wait,
]);
shazam($audio_url,$cid);
}
?>
Please open Telegram to view this post
VIEW IN TELEGRAM
๐ฅฑ4โค1
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
2023 yilni ham tiqdilaring ๐ข ๐
Please open Telegram to view this post
VIEW IN TELEGRAM
๐ข1๐ณ1
Please open Telegram to view this post
VIEW IN TELEGRAM
<?php
$token = 'Bot tokeningiz';
$chat_id = 'Chat ID';
$document = 'faylning_to'liq_manzili.jpg'; // Yuborishni istagan fayl manzili
$apiUrl = "https://api.telegram.org/bot{$token}/sendDocument";
$postFields = [
'chat_id' => $chat_id,
'document' => new CURLFile($document),
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type:multipart/form-data']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
Please open Telegram to view this post
VIEW IN TELEGRAM
๐1
$update = json_decode(file_get_contents('php://input'));
$type = $message->chat->type;
$text = $message->text;
$cid = $message->chat->id;
$ispremium = $message->from->is_premium;
if($text=="/start" and $type == "private"){
bot('sendmessage',[
'chat_id'=>$cid,
'reply_to_message_id'=>$mid,
'text'=>"๐ Salom bizni botimizga xush kelibsiz!",
'parse_mode' => 'html',
]);
if($ispremium){
bot('sendmessage',[
'chat_id'=>$cid,
'text'=>"<b>โญ๏ธ Premiumingiz bor ekan!</b>",
'parse_mode' => 'html',
]);
}else{}
}Please open Telegram to view this post
VIEW IN TELEGRAM
function one($word){
$firstChar = $word[0];
return $firstChar;
}
function two($word) {
$last = $word[strlen($word) - 1];
return $last;
}
$text = "Yaxshi Dasturchilar";
$fine = one($text);
$cds = two($text);
echo "$text ning 1-harfi: $fine";
echo "\n";
echo "$text ning ohirgi harfi: $cds";Please open Telegram to view this post
VIEW IN TELEGRAM
$antifloodDelay = 3; // To'xtash uchun vaqtni belgilash (sekundda)
$antifloodLimit = 5; // To'xtash limitini belgilash
// Antiflood uchun o'zgaruvchilarni o'zlashtirish
if (!isset($update['message']['date'])) {
$update['message']['date'] = time();
}
$user_id = $update['message']['from']['id'];
$user_key = 'antiflood_' . $user_id;
$floodCount = $redis->get($user_key);
if (!$floodCount) {
$floodCount = 1;
$redis->set($user_key, $floodCount, $antifloodDelay);
} else {
if ($floodCount >= $antifloodLimit) {
// To'xtalishni aniqlash
$delay = $redis->ttl($user_key);
if ($delay > 0) {
// To'xtalish uchun kichik xabar yuborish
$response['text'] = 'Iltimos, keyinroq yozing. Sabrli bo\'ling.';
$response['method'] = 'sendMessage';
$response['chat_id'] = $update['message']['chat']['id'];
$response['reply_to_message_id'] = $update['message']['message_id'];
$response['parse_mode'] = 'HTML';
sleep($delay);
return $response;
} else {
$redis->set($user_key, 1, $antifloodDelay);
}
} else {
// Antiflood ni ozgartirish
$redis->incr($user_key);
}
}
Please open Telegram to view this post
VIEW IN TELEGRAM
๐2
Random reaksiya bosadigan funksiya (bot uchun) โ
๐ฌ @phpcodersuzb
return bot('setmessagereaction', [
'chat_id' => $cid,
'message_id' => $mid,
'reaction' => json_encode(array([
'type' => 'emoji',
'emoji' => $reaction,
])
)
]);
}
if(isset($message)){
$reactions = ['๐', '๐คฏ', '๐ค','๐ฅ','โค๏ธ','๐', '๐คทโโ๏ธ', '๐','๐','๐ค','๐','๐',];
$randomReaction = $reactions[array_rand($reactions)];
reaction($cid, $mid, $randomReaction);
}
Please open Telegram to view this post
VIEW IN TELEGRAM