Skip to content

This code in php allow to memorize all the user that has started the chat with a bot and send them message or photo.

Notifications You must be signed in to change notification settings

Bellonio/TelegramBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Bot

This code in php allow to memorize all the user that has started the chat with a bot and send them message or photo.

It use the official Telegram Bot API simply by HTTP request.

Run this .php file every time you want to check if new user has started the chat with the bot

check_updates.php

To send a message/photo in a chat run this .php. The possibile parameter are:

index.php
Parameter Type Description
chat_id int Identifier of the user chat with the bot.
username string Identifier of the user (automatically check if the username is memorize in chat_ids.json and get his chat_id)
text string The text message to send
photo string URL or path to local photo to send

Required: chat_id or username

Required: text or photo

About

This code in php allow to memorize all the user that has started the chat with a bot and send them message or photo.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages