Как установить URL для Telegram-Webhook, когда мой хост является внутренним хостом - PullRequest
0 голосов
/ 28 января 2019

URL-адрес webhook для установки webhookurl

https://api.telegram.org/botYOUR-TOKEN/setwebhook?url=https://58.222.100.41/pm

как я могу установить wewebhook, когда хочу подключить своего бота к своему проекту с php.

note !!!!!!!URL моего домена выглядит как 85.255.100.41/pm

мой код в php:

include("Tel/Telegram.php");
date_default_timezone_set("asia/tehran");
// Set the bot TOKEN
$bot_id = "689393892:*****";
// Instances the class
$telegram = new Telegram($bot_id);
$text = $telegram->Text();
$username = $telegram->Username();
$name = $telegram->FirstName();
$family = $telegram->LastName();
$message_id = $telegram->MessageID();
$user_id = $telegram->UserID();
$chat_id = $telegram->ChatID();
if(!is_null($text) && !is_null($chat_id)){$content = array('chat_id' => $chat_id, 'text' => $user_id);
    $telegram->sendMessage($content);
}
...