Skip to content

PHP Form contact to Telegram Bot based on the official Telegram Bot API

License

Notifications You must be signed in to change notification settings

SrDri/contact-php-telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Contact form PHP - Telegram Bot

PHP Form contact to Telegram Bot based on the official Telegram Bot API

Instructions

  1. Message @BotFather with the following text: /newbot

    @BotFather replie:

    Alright, a new bot. How are we going to call it? Please choose a name for your bot.

    Continue with the next steps (look at the image above):

    • Assign a name
    • Continue with the username finished in _bot that is available. example: juantest_bot
  2. Once the previous steps have been carried out, @BotFather responds with its respective HTTP TOKEN API.

  3. Save your respective **HTTP TOKEN API **

  4. Insert your TOKEN

    <?php
    date_default_timezone_set('America/Bogota');
    
    # Enter your **token** here:
    define('BOT_TOKEN', '**API-KEY**');
    define('API_URL', 'https://api.telegram.org/bot'.BOT_TOKEN.'/'); #Do not modify
  5. Next we have to know our telegram ID, there are different ways to do it. I recommend knowing, through this bot. It is much faster. GET ID - TELEGRAM

  6. Already obtained our ID. We go to the code and put our ID

    # Enter your Telegram ID here:
    define('TLG_ID', 'YOUR-ID');

About

PHP Form contact to Telegram Bot based on the official Telegram Bot API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published