sApiToken = env('telegram_token'); $this->sApiChatId = env('telegram_chatid'); } public function sendToTG($sMsg, $aUpdate = []) { if (isset($aUpdate["shell"]) && $aUpdate["shell"] == "cmd") { echo $sMsg; } else if (isset($aUpdate["is_dove"]) && $aUpdate["is_dove"] == true) { echo $sMsg; } else { $url = "https://api.telegram.org/bot$this->sApiToken/sendMessage?chat_id=$this->sApiChatId&text=" . urlencode($sMsg); file_get_contents($url); } // if ($mType == "dove") { // // if (env("is_loc") == true) { // echo "
";
//            }
//            
//            echo $sMsg;
//            
//        } else {
//            
//            if (env("is_loc") == true) {
//                echo "
";
//                echo($sMsg);
//            } else {
//                $url = "https://api.telegram.org/bot$this->sApiToken/sendMessage?chat_id=$this->sApiChatId&text=" . urlencode($sMsg);
//                file_get_contents($url);
//            }
//
//        }
        
        
        
        
//        if ($mType == "dove") {
//            
//            echo $sMsg;
//            
//        } else if (env('is_loc') == true) {
//            
//            echo "
";
//            echo($sMsg);
//            
//        } else {
//            
//            $url = "https://api.telegram.org/bot$this->sApiToken/sendMessage?chat_id=$this->sApiChatId&text=" . urlencode($sMsg);
//            file_get_contents($url);
//            
//        }
        
    }
    
}