thezahedi/telegram-bot-api

A very simple PHP Telegram Bot API

v1.0 2019-09-28 12:15 UTC

This package is auto-updated.

Last update: 2024-09-29 05:42:25 UTC


README

A very simple PHP Telegram Bot API.

Requirements

  • PHP >= 5.3
  • Curl extension for PHP5 must be enabled.
  • Telegram API key, you can get one simply with @BotFather with simple commands right after creating your bot.

For the WebHook:

  • An VALID SSL certificate (Telegram API requires this). You can use Cloudflare's Free Flexible SSL which crypts the web traffic from end user to their proxies if you're using CloudFlare DNS.
    Since the August 29 update you can use a self-signed ssl certificate.

For the getUpdates(Long Polling):

  • Some way to execute the script in order to serve messages (for example cronjob)

Download

Using Composer

From your project directory, run:

composer require thezahedi/telegram-bot-api

or

php composer.phar require thezahedi/telegram-bot-api

Note: If you don't have Composer you can download it HERE.