Download the PHP package estaheri/easytel without Composer
On this page you can find all versions of the php package estaheri/easytel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download estaheri/easytel
More information about estaheri/easytel
Files in estaheri/easytel
Package easytel
Short Description An easy to use php library for using telegram bot api
License MIT
Homepage https://github.com/es-taheri/easytel
Informations about the package easytel
PHP Telegram Bot Library
An easy to use php library for using telegram bot api
Table of Contents
- Introduction
- Quick Usage
- Instructions
- Require in project
- Webhook installation
- Self Signed Certificate
- Unset Webhook
- Updates
- Types
- Methods
Introduction
This is a fully php classes structured and easy to use library for communicating with telegram bot api and managing your bots. π€\ As it's just a library you can use it next to any framework for example Laravel, Codeigniter,... π\ Every Methods & Types has it's own description same as official telegram bot api document using standard phpdoc. π\ Unlike other library this library full support object oriented structured any Methods and Types available on Telegram Bot API which means you can get full IDE auto complete/code suggestion when using library. (So feel free to use
Ctl+Spaceπ)\ All requests to telegram will be sent async through GuzzleHttp β‘
Quick Usage
-
Require library in your project π
-
Require composer autoload in your php code β
-
Instantiating
Telegramclassπ‘ - Now you can use telegram request methods or telegram webhook updateβ
Instructions
Here we explained step by step how to use this library and working with telegram bots.
Install composer
[!NOTE]\ If composer with php 8.2 installed on your system ignore this step
Linux based operating systems installation :
Windows based operating systems installation :\
Download
Composer-Setup.exefrom link bellow than run it and follow installation steps.\ https://getcomposer.org/Composer-Setup.exe
Require in project
Open terminal in your project folder and run this composer command :
Than include composer autoload.php file to load EasyTel library in your codes :
Getting Updates
Now you have to use a way for getting your bot updates from telegram.\
Telegram gives us two options getUpdates method or Webhook.
-
Webhook (Recommended)
In this method you set a url to your webhook handler route or php file than telegram will send you any updates of messages or callback queries to it.\ webhook.php :
Than set webhook to your webhook address :
-
GetUpdates
In this method you don't need to set webhook or webhook file just request to telegram for getting updates using getUpdates method :