Skip to content

Saleh7/TelegramBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TelegramBot

Class for Telegram APi in PHP

Create a New Bot

  1. Add @BotFather to start conversation.
  2. Type /newbot and @BotFather will ask the name for your bot.
  3. Choose a cool name, for example The Nice Bot and hit enter.
  4. Now choose a username for your bot. It must end in bot, for example NiceBot or Nice_Bot.
  5. If succeed, @BotFather will give you API key to be used in this library.

Telegram Bot API

Telegram Bot API - Introduction to Bots.

Example usage Class TelegramBot

require('TelegramBot.php');

$TokenAPI = 'Your Api Key Here';
$BotNow = new TelegramBot($TokenAPI);

// Send message to user.
$ChatId = "26038459"; // id Chat
$TextMsg = "Hello world";
$BotNow ->SendMessage($ChatId,$TextMsg); // Success!

ClassTelegram.php Function List

  • Request()
  • RequestFile()
  • GetUpdates()
  • SetWebhook()
  • getMe()
  • SendMessage()
  • ForwardMessage()
  • SendPhoto()
  • SendAudio()
  • SendDocument()
  • SendSticker()
  • SendVideo()
  • SendVoice()
  • SendLocation()
  • SendChatAction()
  • GetUserPhotos()
  • GetFile()

About

Class for Telegram APi in PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages