Skip to content

nurmuhammet-ali/pure-php-telegram-bot

Repository files navigation

PURE PHP TELEGRAM BOT

Installation

cp .env.example .env

Add configurations

telegram_token=telegram_bot_token
MYSQL_DATABASE=bot_database
MYSQL_USER=username
MYSQL_PASSWORD=password

Available methods

getUpdates() # updates db with latest chats & users
METHOD: POST
URI: /
FORM-DATA:

action: getUpdates

RESPONSE:

{
    "message": "Successefully updated"
}

sendMessageToAll() # sends message to all users of bot
METHOD: POST
URI: /
FORM-DATA:

action: sendMessageToAll
message: Message to be sent

RESPONSE:

{
    "message": "Successefully sent"
}

sendMessageToUsername() # sends message by username
METHOD: POST
URI: /
FORM-DATA:

action: sendMessageToUsername
username: username
message: Message to be sent

RESPONSE:

{
    "message": "sucess"
}

About

Send notifications via telegram bot

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages