Username (e.g. epiz_XXX) or Website URL
Error Message
Error:error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
Other Information
I’m trying to send a request to the telegram API using the following code
function sendTelegramMessage($torrent_added_msg){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.telegram.org/botSECRET/sendMessage');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSLVERSION, 4);
curl_setopt($ch, CURLOPT_POSTFIELDS, "chat_id=-SECRET&parse_mode=html&text=$torrent_added_msg");
$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
}
sendTelegramMessage("hello");