PHP Telegram Bot based on the official Telegram Bot API with iTelegram Class.

Overview

iTelegram

PHP Telegram Bot based on the official Telegram Bot API

Bots: An introduction for developers

Bots are special Telegram accounts designed to handle messages automatically. Users can interact with bots by sending them command messages in private or group chats.

You control your bots using HTTPS requests to bot API.

The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram. To learn how to create and set up a bot, please consult Introduction to Bots and Bot FAQ.

Installation & Usage:

use iTelegram\Bot;
if (!file_exists('iTelegram.php')) {
    copy('https://raw.githubusercontent.com/iNeoTeam/iTelegram/main/iTelegram.phar', 'iTelegram.php');
}
require_once('iTelegram.php');
$bot		= new Bot();
$bot->Authentification("BOT_ACCESS_TOKEN");

Example PHP Bot:

Authentification(API_KEY); $text = $bot->Text(); $chat_id = $bot->getChatId(); $username = $bot->getChatUsername(); $firstname = $bot->getChatFirstname(); $message_id = $bot->MessageId(); if($text == "/start"){ $r = $bot->sendMessage($chat_id, "Hello $firstname !\n\nSpecial Thanks for using iNeoTeam Telegram Bot Class.\n\nGitHub: https://github.com/iNeoTeam\iTelegram\nPowered By @iNeoTeam.", "HTML", true); }elseif($text == "/update"){ $r = $bot->sendMessage($chat_id, "*Please wait ...*", "MarkDown", true); unlink("iTelegram.php"); copy("https://raw.githubusercontent.com/iNeoTeam/iTelegram/main/iTelegram.phar", "iTelegram.php"); sleep(2); // for example $bot->deleteMessage($chat_id, $r->result->message_id); $bot->sendMessage($chat_id, "New class loaded successfully.", "HTML", true, $message_id); }else{ $bot->sendMessage($chat_id, "*Command not found.*", "MarkDown"); } unlink("error_log"); ?> ">

error_reporting(0);
if(!file_exists("iTelegram.php")){
    copy('https://raw.githubusercontent.com/iNeoTeam/iTelegram/main/iTelegram.phar', 'iTelegram.php');
}
require_once('iTelegram.php');
use iTelegram\Bot;
define('API_KEY', "BOT_ACCESS_TOKEN");

$bot		= new Bot();
$bot->Authentification(API_KEY);
$text		= $bot->Text();
$chat_id	= $bot->getChatId();
$username	= $bot->getChatUsername();
$firstname	= $bot->getChatFirstname();
$message_id	= $bot->MessageId();

if($text == "/start"){
    $r = $bot->sendMessage($chat_id, "Hello $firstname !\n\nSpecial Thanks for using iNeoTeam Telegram Bot Class.\n\nGitHub: https://github.com/iNeoTeam\iTelegram\nPowered By @iNeoTeam.", "HTML", true);
}elseif($text == "/update"){
	$r = $bot->sendMessage($chat_id, "*Please wait ...*", "MarkDown", true);
	unlink("iTelegram.php");
	copy("https://raw.githubusercontent.com/iNeoTeam/iTelegram/main/iTelegram.phar", "iTelegram.php");
	sleep(2); // for example
	$bot->deleteMessage($chat_id, $r->result->message_id);
	$bot->sendMessage($chat_id, "New class loaded successfully.", "HTML", true, $message_id);
}else{
    $bot->sendMessage($chat_id, "*Command not found.*", "MarkDown");
}
unlink("error_log");
?>
You might also like...
Fluent Keyboard builder for php-telegram-bot.
Fluent Keyboard builder for php-telegram-bot.

Table of Contents Installation Usage Defining a Keyboard Defining Buttons Bind Buttons to a Keyboard By Row By Button As Stack ForceReply and ReplyKey

A tool for sending fast and managed messages to Telegram bot users

👋🏻 HiToAll A tool for sending fast and managed messages to Telegram bot users About In some telegram bots programmed with php language, if there are

telegram bot for sell virtual number

Telefake Telegram bot for sell virtual number (fully automatic) Installation create bot in telegram upload script in website with php and ssl (https)

laravel package untuk memudahkan penggunaan MCA dengan Telegram Bot USDI di aplikasi Universitas Udayana.

MCA KubeMQ Laravel laravel package untuk memudahkan penggunaan MCA dengan Telegram Bot USDI di aplikasi Universitas Udayana. Motivasi Proyek ini berfu

 Telegram bot for CC Checker with hella lotta features.
Telegram bot for CC Checker with hella lotta features.

SDMN CHECKER BOT Telegram bot for CC Checker with hella lotta features. 📝 Table of Contents Dependencies / Limitations Future Scope Setting up a Hero

Create and manage advanced polls with this Telegram Bot which has many features available!
Create and manage advanced polls with this Telegram Bot which has many features available!

MasterPollBot Create and manage advanced polls with this Telegram Bot which has many features available! Requirements Local Telegram Bot API or a webh

Bin checker telegram bot
Bin checker telegram bot

BIN Checker Bot Test Bot: Bin Checker Bot Env API_TOKEN Bot token. START_MSG Custom start message. Deploy Heroku Railway ⚠ Warn: Still not Tested on R

This app remembers todo list in every specified time (e. every minute, hour, day etc) through telegram bot

remember_todo_list This app remembers todo list in every specified time (e. every minute, hour, day etc) through telegram bot This project includes tw

The Telegram bot framework that doesn't drive you nuts.
The Telegram bot framework that doesn't drive you nuts.

Nutgram The Telegram bot framework that doesn't drive you nuts This framework takes advantage of the latest PHP 8 features, and tries to make the spee

Comments
  • not filtred isset values

    not filtred isset values

    Log error then use this class: PHP Notice: Undefined index: callback_query in iTelegram.php on line 345 PHP Notice: Undefined index: callback_query in iTelegram.php on line 207 PHP Notice: Undefined index: callback_query in iTelegram.php on line 208

    PHP Notice: Undefined index: message in iTelegram.php on line 194 PHP Notice: Undefined index: message in iTelegram.php on line 195 PHP Notice: Undefined index: username in iTelegram.php on line 195 PHP Notice: Undefined index: message in iTelegram.php on line 196 PHP Notice: Undefined index: message in iTelegram.php on line 199 PHP Notice: Undefined index: message in iTelegram.php on line 206

    PHP Notice: Undefined index: callback_query in iTelegram.php on line 345

    opened by Skeffirson 0
Owner
iNeoTeam | آی نئو
آی نئو معتبر ترین گروه ارائه دهنده انواع سرویس های تلگرامی در ایران طراحی انواع ربات های تلگرامی
iNeoTeam | آی نئو
🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.

Telegram Bot API - PHP SDK Telegram Bot PHP SDK lets you develop Telegram Bots in PHP easily! Supports Laravel out of the box. Telegram Bot API is an

Irfaq Syed 2.5k Jan 6, 2023
Integrate Your PHP Code With Telegram Bot API for Beginner

Documentation[https://core.telegram.org/bots/api] Resource[https://github.com/bachors/KBBI.sql] Integrate Your PHP Code With Telegram Bot API for Begi

Nova Andre Saputra 1 Oct 19, 2021
Easy to install email tracker with gui and telegram api bot with date device & ip tracking,

mail-php-tracking-with-gui ?? Simple mail tracking program that uses php, html, telegram bot, and a gui The gui The gui lets you create specific links

null 7 Dec 20, 2022
A telegram bot to check credit cards. written in php & py

MRBANKER BOT A telegram bot to check credit cards. written in php & py. You can find me on telegram STEP1: goto botfather create a bot copy the token

Nitin1818 48 Dec 30, 2022
NovaGram - An elegant, Object-Oriented, reliable PHP Telegram Bot Library

An elegant, Object-Oriented, reliable PHP Telegram Bot Library Full Documentation • Public support group Examples • Features • Installation ?

Gaetano 165 Jan 6, 2023
Simple telegram auto reminder BOT with PHP

Telebot Script Telegram BOT Auto Reminder Dibuat pake PHP OOP Sebenernya bukan buat dipublish sih, ini cuma buat praktek PHP OOP sama praktek Commit &

its Galih 4 Nov 7, 2022
Simple php telegram bot.

PHPTGBot Description Simple php telegram bot. Just for fun ?? Work In Progress ?? Maybe found error, since im not tested yet! Still on working, so be

Yoga Pranata 2 Nov 24, 2021
A simple php telegram bot to check if the bin is valid or not!

Bin-Checker A simple php telegram bot to check if the bin is valid or not! Deploy FORK the Repo by clicking HERE Add your bot token in LINE 12 THEN DE

ʀᴇxɪɴᴀᴢᴏʀ 1 Nov 23, 2021
PHP Source - Telegram Bot - Standart Method

Telegram Bot- yaratish uchun mo'ljallangan standart metod asosida ishlovchi, PHP tilida yozilgan kod Dasturchilarning eng yaxshi ko'rgan odati c/p bo'

Jabborov Abduroziq 4 Mar 30, 2022
A Php Checker Bot For Telegram.

A Card Checker Bot For Telegram Based On Telegram.

Roldex Stark 16 Dec 29, 2022