telegram-bot-php / core Goto Github PK
View Code? Open in Web Editor NEWA PHP library that makes using Telegram Bot API much easier.
Home Page: https://telegram.litehex.com/
License: MIT License
A PHP library that makes using Telegram Bot API much easier.
Home Page: https://telegram.litehex.com/
License: MIT License
<?php
$br = PHP_EOL;
$sp = DIRECTORY_SEPARATOR;
require_once __DIR__ . $sp . "vendor" . $sp . "autoload.php";
use TelegramBot\Entities\Update;
use TelegramBot\Telegram;
use TelegramBot\Request;
$admin_id = 1269777916;
$bot_token = "5801896630:AAEd0Z1FhgLZCFQqIbDOxe5E5KUj0ZlgRKw";
$hook_url = "WEB HOOK URL";
Telegram::setToken($bot_token);
Telegram::setAdminId($admin_id);
$response = Request::setWebhook([
"url" => $hook_url,
"certificate" => "./.cert/cert.crt"
]);
if ($response->isOk()) {
$result = Request::sendMessage([
"chat_id" => $admin_id,
"text" => $response->getResult()
]);
echo $response->getDescription();
exit(0);
}
print_r(Update::TYPE_MESSAGE);
print_r($result->getRawData(false));
?>
Deprecated: Creation of dynamic property EasyHttp\Model\HttpResponse::$curlHandle is deprecated in /data/data/com.termux/files/home/IA/vendor/shahradelahi/easy-http/src/Model/HttpResponse.php on line 46 Deprecated: Creation of dynamic property EasyHttp\Model\HttpResponse::$statusCode is deprecated in /data/data/com.termux/files/home/IA/vendor/shahradelahi/easy-http/src/Model/HttpResponse.php on line 117 Deprecated: Creation of dynamic property EasyHttp\Model\HttpResponse::$headerSize is deprecated in /data/data/com.termux/files/home/IA/vendor/shahradelahi/easy-http/src/Model/HttpResponse.php on line 117 Deprecated: Creation of dynamic property EasyHttp\Model\HttpResponse::$headers is deprecated in /data/data/com.termux/files/home/IA/vendor/shahradelahi/easy-http/src/Model/HttpResponse.php on line 80 Deprecated: Creation of dynamic property EasyHttp\Model\HttpResponse::$body is deprecated in /data/data/com.termux/files/home/IA/vendor/shahradelahi/easy-http/src/Model/HttpResponse.php on line 117 Deprecated: Creation of dynamic property TelegramBot\Entities\Response::$ok is deprecated in /data/data/com.termux/files/home/IA/vendor/telegram-bot-php/core/src/Entity.php on line 42 Deprecated: Creation of dynamic property TelegramBot\Entities\Response::$result is deprecated in /data/data/com.termux/files/home/IA/vendor/telegram-bot-php/core/src/Entity.php on line 42 Deprecated: Creation of dynamic property TelegramBot\Entities\Response::$description is deprecated in /data/data/com.termux/files/home/IA/vendor/telegram-bot-php/core/src/Entity.php on line 42 Deprecated: Creation of dynamic property EasyHttp\Model\HttpResponse::$curlHandle is deprecated in /data/data/com.termux/files/home/IA/vendor/shahradelahi/easy-http/src/Model/HttpResponse.php on line 46 Deprecated: Creation of dynamic property EasyHttp\Model\HttpResponse::$statusCode is deprecated in /data/data/com.termux/files/home/IA/vendor/shahradelahi/easy-http/src/Model/HttpResponse.php on line 117 Deprecated: Creation of dynamic property EasyHttp\Model\HttpResponse::$headerSize is deprecated in /data/data/com.termux/files/home/IA/vendor/shahradelahi/easy-http/src/Model/HttpResponse.php on line 117 Deprecated: Creation of dynamic property EasyHttp\Model\HttpResponse::$headers is deprecated in /data/data/com.termux/files/home/IA/vendor/shahradelahi/easy-http/src/Model/HttpResponse.php on line 80 Deprecated: Creation of dynamic property EasyHttp\Model\HttpResponse::$body is deprecated in /data/data/com.termux/files/home/IA/vendor/shahradelahi/easy-http/src/Model/HttpResponse.php on line 117 Deprecated: Creation of dynamic property TelegramBot\Entities\Response::$ok is deprecated in /data/data/com.termux/files/home/IA/vendor/telegram-bot-php/core/src/Entity.php on line 42 Deprecated: Creation of dynamic property TelegramBot\Entities\Response::$result is deprecated in /data/data/com.termux/files/home/IA/vendor/telegram-bot-php/core/src/Entity.php on line 42
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.