Download the PHP package uzdevid/yii2-telegram without Composer

On this page you can find all versions of the php package uzdevid/yii2-telegram. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-telegram

Extension for develop telegram bot

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Usage

Create telegram extension with config params


Set and delete webhook


Send

Send text [docs]

  • $text - [string | required] - message text.
  • $params - [array | optional] - additional params: parse_mode, entities, disable_web_page_preview and other. Read the telegram bot docs...
  • $chat_id - [integer | required] - telegram user chat id.

Note: All send requests return a response from telegram

Example


Send photo [docs]

  • $photo - [string | required] - path to photo.
  • $params - [array | optional] - additional params: parse_mode, caption_entities, disable_notification and other. Read the telegram bot docs...
  • $text - [string | optional] - caption for photo.
  • $chat_id - [integer | required] - telegram user chat id.

or you can send a photo without a caption


Send video [docs]

  • $video - [string | required] - path to video.
  • $params - [array | optional] - additional params: duration, width, height and other. Read the telegram bot docs...
  • $text - [string | optional] - caption for video.
  • $chat_id - [integer | required] - telegram user chat id.

or you can send a video without a caption


Send sticker [docs]

  • $sticker [string | required] - sticker id.
  • $params - [array | optional] - additional params: disable_notification, protect_content, reply_to_message_id and other. Read the telegram bot docs...
  • $chat_id - [integer | required] - telegram user chat id.

Send contact [docs]

  • $phone [string | required] - phone number.
  • $first_name [string | required] - first name.
  • $last_name [string | optional] - last name.
  • $params - [array | optional] - additional params: vcard, disable_notification, protect_content and other. Read the telegram bot docs...
  • $chat_id - [integer | required] - telegram user chat id.

Send poll [docs]

  • $question - [string | required] - Question.
  • $options - [array | required] - Options.
  • $correct_option_id - [integer | optional] - Correct option id, Required for polls in quiz mode.
  • $params - [array | optional] - additional params: type, allows_multiple_answers, explanation and other. Read the telegram bot docs...

Send message, photo, video, sticker and poll with inline keyboard and/or keyboard

Keyboard


URL inline keyboard


callback inline keyboard


Handlers

Note: When processing requests, there is no need to specify a chat id when sending a response to a request.

Processing /start request


Processing callback query


Processing all (*) inline query


All versions of yii2-telegram with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ~2.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package uzdevid/yii2-telegram contains the following files

Loading the files please wait ....