$urlQuery = "https://api.telegram.org/bot" . $token . "/sendMessage?chat_id=". $chatId ."&text=" . $textMessage;
public function makeRequest(array $args, string $type)
{
if($type === "apiTelegram") {
$website="https://api.telegram.org/bot".$args[0];
$params5=[
'chat_id'=>$args[1],
'text'=>$args[2],
];
$ch5 = curl_init($website . '/sendMessage');
curl_setopt($ch5, CURLOPT_HEADER, false);
curl_setopt($ch5, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch5, CURLOPT_POST, 1);
curl_setopt($ch5, CURLOPT_POSTFIELDS, ($params5));
curl_setopt($ch5, CURLOPT_SSL_VERIFYPEER, false);
$result5 = curl_exec($ch5);
curl_close($ch5);
return $result5;
}
}