Download the PHP package rootscratch/telegram without Composer
On this page you can find all versions of the php package rootscratch/telegram. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package telegram
🚀 Basic Telegram Sender PHP
A simple PHP script to send messages to a Telegram group using a bot. 🤖
📥 Installation
-
Clone the Repository:
- Install Dependencies:
🛠️ Setup Guide
📌 Step 1: Create a Telegram Bot
- Open Telegram and search for
@BotFather
. 🤖 - Start a chat with
@BotFather
and create a new bot. - Once created, you will receive a bot token. Save this token for later use. 🔑
📌 Step 2: Create a Group and Add the Bot
- Create a new Telegram group.
- Add your bot to the group.
- Send any message in the group to initialize it. 🆕
📌 Step 3: Get the List of Updates
To retrieve the updates for your bot, use the following API request:
Example:
📌 Step 4: Find the Chat ID
Look for the "chat" object in the API response:
- The
id
inside the "chat" object is your Group Chat ID and always starts with-
. 🆔 - Use this ID when sending messages to the group. 📩
Note: If you created a new group and the API response only returns:
Try removing and re-adding the bot to the group. 🔄
🚀 Usage
-
Modify
index.php
: - Run the script:
📡 API Response Example
⚠️ Troubleshooting
- If you get
{"ok":true,"result":[]}
when retrieving updates, try removing and re-adding the bot to the group. 🔄 - Make sure the bot has permission to send messages in the group. ✅
📜 License
This project is licensed under the MIT License. 📝
👨💻 Author
All versions of telegram with dependencies
PHP Build Version
Package Version
No informations.
The package rootscratch/telegram contains the following files
Loading the files please wait ....