QANAQA KOD KERAK #comment SOTILADIGAN KODLARDAN SURAMELA
// Bot tokenni o'rnating
define('BOT_TOKEN', '123456789:AAAAAAAA-BOT-TOKEN-HERE');
define('API_URL', 'https://api.telegram.org/bot' . BOT_TOKEN . '/');
function tgRequest($method, $params = [])
{
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => API_URL . $method,
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => $params,
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 30,
]);
$res = curl_exec($ch);
$http = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$err = curl_error($ch);
curl_close($ch);
if ($res === false $http < 200 $http >= 300) {
error_log("Telegram API error: HTTP $http; $err; response: $res");
return false;
}
return json_decode($res, true);
}
/**
* Yozmoqda/typing ko'rsatish
* @param int|string $chat_id
* @param string $action typing|upload_photo|record_video|upload_video|record_voice|upload_voice|upload_document|choose_sticker|find_location|record_video_note|upload_video_note
* @param int $duration Sekundda qancha vaqt “yozmoqda” ko‘rsatilsin (0 bo‘lsa — bir marta yuboriladi)
*/
function sendChatAction($chat_id, $action = 'typing', $duration = 0)
{
// Bir marta jo'natish
if ($duration <= 0) {
return tgRequest('sendChatAction', [
'chat_id' => $chat_id,
'action' => $action
]);
}
// Uzoq jarayonlar uchun ma'lum oraliqda yangilab turish
$end = time() + $duration;
while (time() < $end) {
tgRequest('sendChatAction', [
'chat_id' => $chat_id,
'action' => $action
]);
// Telegram typing ~5 sekundgacha ko'rinadi, 4 sekundda bir yangilaymiz
sleep(4);
}
return true;
}
/** Oddiy xabar yuborish */
function sendMessage($chat_id, $text, $parse_mode = null)
{
$params = ['chat_id' => $chat_id, 'text' => $text];
if ($parse_mode) $params['parse_mode'] = $parse_mode;
return tgRequest('sendMessage', $params);
}
/** Misol: uzoq jarayon oldidan “yozmoqda…” ko'rsatish */
function handleLongTask($chat_id)
{
// 8 sekund davomida “yozmoqda…” ko‘rsatamiz
sendChatAction($chat_id, 'typing', 8);
// Bu yerda og‘ir hisob-kitob yoki API so‘rovlaringiz bo‘lishi mumkin
// ...
// Yakunda natijani yuboramiz
sendMessage($chat_id, "Tayyor! Uzoq vazifa yakunlandi ✅");
}
// ---- Webhook/update namunasi ----
$update = json_decode(file_get_contents('php://input'), true);
if ($update && isset($update['message'])) {
$chat_id = $update['message']['chat']['id'];
$text = trim($update['message']['text'] ?? '');
if ($text === '/start') {
// Qisqa typing
sendChatAction($chat_id, 'typing');
sendMessage($chat_id, "Assalomu alaykum! Men tayyorman.");
} elseif ($text === '/heavy') {
handleLongTask($chat_id);
} else {
sendChatAction($chat_id, 'typing');
sendMessage($chat_id, "Buyruq: " . $text);
}
}
Yozmoqda Funksiyasi soat botga moslab olasila
Open budjet avto kod kimda bor tarqalmagan udari #comment
телергам ишончлик накрутка хизмати бор✔️
✅
реаксия✅
арзон нархларда✔️
😩 Telegram Premium Olib beramiz 😑
😑 Akauntga Kirib kirmasdan olib beramiz beramiz 😑
🌐 Professional darajada telegram bot yaratib beramiz
✈️ Murojat: @Xavfsizlikdan
⚠️ Spamlar - @TechAloqabot ✅
📊 Loyihalarim - @Sotiladigan_botla
🏪 #Atziv - @Bots_Otziv ✈️
БЕЗМИНУС НАКРУТКАпарсмотр✅
МИНУС НАКРУТКА✅
ПРЕМУИМ НАКРУТКА✅
УЗБЕК НАКРУТКА✅
реаксия
арзон нархларда
Please open Telegram to view this post
VIEW IN TELEGRAM
Botlardan Sifatli reklamalar sotamiz open budjet va boshqa narsalar uchun
@Musiqapulbot - 🧑🏻💻 Botdagi obunachilar: 18761 ta
@Yukla_saver_bot - 🧑🏻💻 Botdagi obunachilar:
@trendgoloslaribot - Obunachilar soni: 5 689 ta
@Capcutpro_freebot - Jami a’zolar: 14096 ta
@HarfgaRasmrobot - 👤 Obunachilar: 28881
@Ismga_vedeobot - 👤Obunachilar 11697
@Zayafka_Qabul_MusicBot - 👥Umumiy Userlar: 11427
@Azoxisobchibot - 👤 Userlar: 231 👥Guruxlar: 812
Reklamadan effect kelishi sizning postingizdan Bo'ladi.shuni unutmang aniq maqsad bilan lchkamga yozing Narxlar.lichkada.gaplashiladi
@Xavfsizlikdan
@techaloqabot
@Musiqapulbot - 🧑🏻💻 Botdagi obunachilar: 18761 ta
@Yukla_saver_bot - 🧑🏻💻 Botdagi obunachilar:
13777 ta @trendgoloslaribot - Obunachilar soni: 5 689 ta
@Capcutpro_freebot - Jami a’zolar: 14096 ta
@HarfgaRasmrobot - 👤 Obunachilar: 28881
@Ismga_vedeobot - 👤Obunachilar 11697
@Zayafka_Qabul_MusicBot - 👥Umumiy Userlar: 11427
@Azoxisobchibot - 👤 Userlar: 231 👥Guruxlar: 812
Reklamadan effect kelishi sizning postingizdan Bo'ladi.shuni unutmang aniq maqsad bilan lchkamga yozing Narxlar.lichkada.gaplashiladi
@Xavfsizlikdan
@techaloqabot
❤1
NomerSim.zip
212.4 KB
‼️ Manba - @php_Python_kodlar
PHP PYTHON KODLARI
@AnonimSuxbatdoshbot kodi sotiladi aniq maqsad bilan lic 20$
Hozir olganga 10$ ga bervoraman
Profilga Soat kodi sotiladi 10$ profilga soat qoyib yurasila
@xavfsizlikdan
@xavfsizlikdan
Qanaqa loyihalar bor zerikdi odam #comment
👍4🥰3🎉2🤩2❤🔥2💯2❤1😍1