Skip to content

BenJanet4me/telegram-php

Repository files navigation

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
  6. curl-funtions.php The simplest telegram php bot with Curl sending functions ( Curl sendPhoto, sendLocation, sendMessage etc... )

site (russian)

https://net4me.net/telegram/telegram_php.html https://net4me.net/telegram/telegram_curl.html