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)713MITPHP

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 2d 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 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

1039d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22792495?v=4)[Mithat Can Turan](/maintainers/mitokande)[@mitokande](https://github.com/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

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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