Yangi formatda davom etish uchun: https://uzfor.net/view.php?act=post&id=89578
Postga havola
Akbarali [2384] [off]
Shaxsan o`zim telegram botda php curldan emas Guzzle, PHP HTTP client da yozishni boshladim. Tezligi ancha yaxshi bo`lar ekan.
Guzledagi botga namuna:
Guzledagi botga namuna:
<?php require_once( 'vendor/autoload.php' ); use GuzzleHttp\Client; $apiKey = '<TOKEN>'; // Put your bot's API key here $apiURL = 'https://api.telegram.org/bot' . $apiKey . '/'; $chatid = $update->message->chat->id; $type = $update->message->chat->type; $lastname = $update->message->chat->last_name; $fristname = $update->message->chat->first_name; $keyboard2 = json_encode(['inline_keyboard' => [[['url' => 'https://t.me/convertor_group', 'text' => 'Guruhga qo`shilish'], ], [['url' => 'https://uzhackersw.uz/', 'text' => 'Saytga kirish'], ], ], ]); $keyboard = json_encode(['inline_keyboard' => [[['url' => 'https://t.me/convertor_group', 'text' => 'Guruhimiz'], ], [['url' => 'https://uzhackersw.uz/', 'text' => 'Saytga kirish'], ], ], ]); $akbarali = '<ADMIN_ID>'; $guruhim = '<CHAT_ID>'; if ( $update->message->text == 'Hello' ){ } if ( $update->message->text == 'file' ){ } if ( $update->message->text == '/start' ){ 'chat_id' => $chatid, 'text' => "Salom " . $fristname. " " .$lastname . ". Men JPG rasmni PDF qilish sizga tashlash uchun @kbarali tomonidan yozildim. Menga rasm tashlashdan oldin /boshla buyrug`ini bering. Keyin JPG rasmni PHOTO qilish tashlang (file qilib emas)!", 'parse_mode' => 'html', 'reply_markup' => $keyboard2))); }