Skip to content

Telegram da Bot yasash uchun qulay php plugin bunda siz ixtiyoriy turdagi botlarni yasashingiz mumkin

License

Notifications You must be signed in to change notification settings

sjomurodov/Telegram-PHP-API

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram-PHP-API

API PHP CURL

Telegram-API-PHP bu telegram messenjerida oson bot uchish uchun yozilgan open source code. Bu orqali siz istalgancha ozingizga telegram botlari ochishingiz mumkin va juda oson.

Yuklab olish


Github orqali

Loyiha katalogidan ishga tushiring:

https://github.com/shoxruxrashidov/Telegram-API-PHP.git

Github orqali 2

Download tugmachasiga bosing va yukalb oling

Pluginni ornatish


TelegramBot.php-ni serveringizga nusxalash va uni yangi bot skriptingizga qo'shish kerak boladi:

include 'Telegram.php';

$telegram = new TelegramBot();
$telegram->setToken('Sizning tokeningiz');

Konfiguratsiya (WebHook)

Eslatma: Webhook faqat bir maratta connect qilinadi.

echo $telegram->setWebhook('saytingiz manzili');

Namuna

 
    require_once 'TelegramBot.php';
  
    $telegram = new TelegramBot();
    $telegram->setToken('sizning token');
    $data = $telegram->getData();

Avto javob berish


    if ($data->text == 'salom'){
        $telegram->sendMessage('Salom Qalesiz?');
    }

Fotosurat yuborish


 if ($data->text == 'rasim yubor' || $data->text == 'rasim jonat'){
        $telegram->sendPhoto('https://www.fotor.com/ru/loopBannerImg/ru-homeloop2.jpg','senga rasim kerakmi ol ana bolmasa');
    }

About

Telegram da Bot yasash uchun qulay php plugin bunda siz ixtiyoriy turdagi botlarni yasashingiz mumkin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%