PHPackages                             mitokande/php-telegram - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mitokande/php-telegram

ActiveLibrary[API Development](/categories/api)

mitokande/php-telegram
======================

a php package to send telegram bot messages

1.0.2(2y ago)613MITPHP

Since Aug 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mitokande/php-telegram)[ Packagist](https://packagist.org/packages/mitokande/php-telegram)[ RSS](/packages/mitokande-php-telegram/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

\#PHP TELEGRAM By Mithat Can Turan

V1.0.2

What's new?

-Now you can create your bot with TelegramBotCreator Class.

-Added sending multiple message functionality to TelegramBot Class.

First import my package with composer

```
composer require mitokande/php-telegram

```

```
use Mitokande\PhpTelegram\TelegramBotCreator;
use Mitokande\PhpTelegram\TelegramMessage;

TelegramBotCreator::SetTelegramBot(__Your_Token__);
TelegramBotCreator::$TelegramBot->SendTelegramMessage(new TelegramMessage(__RECEIVER_CHAT_ID__, __YOUR_MESSAGE_));
```

For sending a message to multiple users at once:

```
use Mitokande\PhpTelegram\TelegramBotCreator;
use Mitokande\PhpTelegram\TelegramMessage;

TelegramBotCreator::SetTelegramBot(__Your_Token__);
TelegramBotCreator::$TelegramBot->SendMultipleTelegramMessage(__ARRAY_OF_CHAT_ID_STRINGS__, __YOUR_MESSAGE__);
```

If you were to use it in a class you can create your bot in the construct of your class and just use the static bot variable inside it in all of your methods.

```
use Mitokande\PhpTelegram\TelegramBotCreator;
use Mitokande\PhpTelegram\TelegramMessage;
use Mitokande\PhpTelegram\TelegramMessageResult;

class TelegramMessager
{
    public function __construct()
    {
        TelegramBotCreator::SetTelegramBot(__Your_Token__);
    }

    public function SendWelcomeMessage($chat_id): TelegramMessageResult
    {
        $bot = TelegramBotCreator::$TelegramBot;
        return $bot->SendTelegramMessage(new TelegramMessage($chat_id, __WELCOME_MESSAGE_FOR_USERS__));
    }
    public function SendPingMessage($chat_id): TelegramMessageResult
    {
        return TelegramBotCreator::$TelegramBot->SendTelegramMessage(new TelegramMessage(__RECEIVER_CHAT_ID__, __YOUR_MESSAGE_));
    }
    public function SendMultiplePingMessage($chat_id_list): TelegramMessageResult
    {
        return TelegramBotCreator::$TelegramBot->SendMultipleTelegramMessage($chat_id_list, __YOUR_MESSAGE_));
    }
}
```

V1.0.1 First import my package with composer

```
composer require mitokande/php-telegram@1.0.2

```

Than in your code import the required classes

```
use Mitokande\PhpTelegram\TelegramBot;
use Mitokande\PhpTelegram\TelegramMessage;
```

Create a Telegram Bot Instance with your Token

```
$bot = TelegramBot::GetInstance(__Your_Token__);
```

Keep in mind that any user that you want to send a message must have started a conversation with your bot Create a Telegram Message with a chatID and Message Content

```
$newMessage = new TelegramMessage(__Your_ChatID__, __Your_Message__);
```

Send the message with your bot and get TelegramMessageResult

```
$result = $bot->SendTelegramMessage($newMessage);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

992d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ebe176ce80287315a0f7bd86bed531b5d5bfd5be49149a546876b88e12f5e5a?d=identicon)[mitokande](/maintainers/mitokande)

---

Top Contributors

[![mitokande](https://avatars.githubusercontent.com/u/22792495?v=4)](https://github.com/mitokande "mitokande (20 commits)")

### Embed Badge

![Health badge](/badges/mitokande-php-telegram/health.svg)

```
[![Health](https://phpackages.com/badges/mitokande-php-telegram/health.svg)](https://phpackages.com/packages/mitokande-php-telegram)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
