PHP code example of peyman-manteali / telegram-notifier

1. Go to this page and download the library: Download peyman-manteali/telegram-notifier library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

peyman-manteali / telegram-notifier example snippets


use TelegramNotifier\Telegram;

$message = "Hello, this is a test message!";
$botToken = "your_bot_token";
$chatId = "your_chat_id";

// Optional: specify the parse mode (HTML, Markdown, MarkdownV2)
$parseMode = "HTML";

$response = Telegram::sendMessage($message, $botToken, $chatId, $parseMode);