Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mehdislr/text2img_bot
This project is a simple Telegram bot that converts text messages into images.
https://github.com/mehdislr/text2img_bot
api curl php telegram-bot text-to-image
Last synced: about 1 month ago
JSON representation
This project is a simple Telegram bot that converts text messages into images.
- Host: GitHub
- URL: https://github.com/mehdislr/text2img_bot
- Owner: MehdiSlr
- License: mit
- Created: 2024-05-08T23:59:16.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-06-22T17:19:30.000Z (7 months ago)
- Last Synced: 2024-12-06T08:06:06.985Z (about 1 month ago)
- Topics: api, curl, php, telegram-bot, text-to-image
- Language: PHP
- Homepage: https://t.me/Text2SampleImgBot
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Md
- License: LICENSE
Awesome Lists containing this project
README
# Text to Image Telegram Bot
This project is a simple Telegram bot that converts text messages into images using the ImgBun API. Users can interact with the bot to receive images generated from their text inputs.
## Features
- Converts text messages into images.
- Responds with a welcome message, help information, and bot information.
- Uses the ImgBun API for image generation.## Technologies Used
- PHP
- Telegram Bot API
- cURL for making HTTP requests## Setup
Follow these steps to set up the bot locally:
### Prerequisites
- PHP installed on your server or local machine.
- A Telegram bot token from BotFather.
- An API key from ImgBun.### Configuration
1. Create a bot token from BotFather.
2. Create an API key from ImgBun.
3. Clone the repository
```bash
git clone https://github.com/MehdiSlr/Text2Img_Bot.git
cd Text2Img_Bot
```4. Create a `config.php` file
Create a `config.php` file in the root directory and add your bot token and ImgBun API key:
```php
```
5. Deploy the bot
Upload the bot script `index.php` and `config.php` to your server. Set the webhook for your bot using the Telegram API:
```bash
https://api.telegram.org/bot/setWebhook?url=https:///index.php
```## Usage
- Start the Bot: Send `/start` to the bot to receive a welcome message.
- Get Help: Click on `Help❔` to receive help information.
- Get Info: Click on `Info❕` to receive bot information.
- Convert Text to Image: Type any text message, and the bot will respond with an image of the text.## Acknowledgements
- [ImgBun](https://imgbun.com) API for text to image conversion.
- [Telegram](https://core.telegram.org/bots/api) for the Telegram bot API.## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Support
If you have any questions or feedback, please [open an issue](https://github.com/MehdiSlr/Text2Img_Bot/issues/new) on GitHub.
## Author
Created by [Mehdi Salari](https://github.com/MehdiSlr) - Telegram [Meytttii](https://t.me/Meytttii).