Using https://github.com/php-telegram-bot
Create some script that will issue tokens for users and will check if user logged in when asked.
auth.php
<?php
date_default_timezone_set('Asia/Bangkok');
| public function getHTML($without_cmd = false){ | |
| if(empty($this->getEntities())){ | |
| return $this->getText($without_cmd); | |
| } | |
| $text = $this->getText(); | |
| $html = ''; | |
| $entities_count = \count($this->getEntities())-1; |
| <?php | |
| $message = ''; | |
| $botoneHook = file_get_contents('https://api.telegram.org/bot___FIRST_BOT_API_KEY___/getWebhookInfo'); | |
| $bottwoHook = file_get_contents('https://api.telegram.org/bot___SECOND_BOT_API_KEY___/getWebhookInfo'); | |
| $botOne = !empty($botoneHook) && !empty(json_decode($botoneHook, true)) && !empty(json_decode($botoneHook, true)['result']['pending_update_count']) && json_decode($botoneHook, true)['result']['pending_update_count'] > 5? | |
| json_decode($botoneHook, true)['result']:'ok'; | |
| $botTwo = !empty($bottwoHook) && !empty(json_decode($bottwoHook, true)) && !empty(json_decode($bottwoHook, true)['result']['pending_update_count']) && json_decode($bottwoHook, true)['result']['pending_update_count'] > 5? | |
| json_decode($bottwoHook, true)['result']:'ok'; |
Using https://github.com/php-telegram-bot
Create some script that will issue tokens for users and will check if user logged in when asked.
auth.php
<?php
date_default_timezone_set('Asia/Bangkok');