Skip to content

ayhan-dev/bot_telegram_php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bot-telegram-php

  • API - Telegram

  • The Telegram bot library for the development of the province has a beta version of the library in PHP language and is being tested

install:

git clone https://github.com/ayhan-dev/bot_telegram_php.git && cd bot_telegram_php 

To use:

$api = new Telegram();
$api->bot('sendMessage',
            array('chat_id' => $chat_id,
                  'text' => 'h hi hi / @ayhan_dev'
      ));

RUN:

  • If you need to deploy on a server outside of Iran:
 $api->setWebhook('https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
  • If you need to deploy on Iran server:
$api->setHook('https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);

Download file from Telegram:

  • Download from external servers:
$api->downloadFile($file_id,"data/")
  • Download from Iranian servers:
$api->download_File($file_id, "data/");

Releases

No releases published

Packages

No packages published

Languages