Skip to content
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
debugerbot.php
hellobot.php
inline.php
net4mebot.php
tupobot.php

README.md

telegram-php

PHP telegram bot simple.

Create bot, set webHook

  1. @BotFather - register new bot + bot token
  2. find hosting with SSL
  3. copy any of php bot script, edit bot token, place script on your hosting (with SSL).
  4. set webHook to script: https://api.telegram.org/botXXXX:XXXXXXXXXXX/setWebhook?url=https://MY.SITE.COM/bot/MYTUPOBOT.php (change uppercased)
  5. use it!

Set of examples of php bots

  1. hellobot.php - hello world php bot script
  2. tupobot.php - exaple php webhook script sendMessage example
  3. debugerbot.php - php bot script to show json
  4. net4mebot.php - real bot http://t.me/net4mebot example of inline keyboard, case, replyMarkup, answerCallbackQuery, sendMessage, editMessageText
  5. inline.php - php bot script for show json "as is" + inline keyboard with callback query answer

site (russian)

http://www.net4me.net/php/telegram-bot-php/

You can’t perform that action at this time.