-
The Telegram bot library for the development of the province has a beta version of the library in PHP language and is being tested
git clone https://github.com/ayhan-dev/bot_telegram_php.git && cd bot_telegram_php
$api = new Telegram();
$api->bot('sendMessage',
array('chat_id' => $chat_id,
'text' => 'h hi hi / @ayhan_dev'
));
- 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 from external servers:
$api->downloadFile($file_id,"data/")
- Download from Iranian servers:
$api->download_File($file_id, "data/");