MOON
Server: Apache
System: Linux server1.primemusicproductions.com 4.18.0-477.27.2.el8_8.x86_64 #1 SMP Fri Sep 29 08:21:01 EDT 2023 x86_64
User: primrwxj (1001)
PHP: 8.3.3
Disabled: NONE
Upload Files
File: //home/primrwxj/africanadating.com/submit.php
<?php
// Configuration
$affiliate_url = "https://www.tkqlhce.com/qb98r09608OSYPUWXUOQQPQVSPW?sid=AfricanaDating"; // HIDE YOUR LINK HERE
$email_file = 'emails.txt';

// Check if the email was posted
if (isset($_POST['email']) && !empty($_POST['email'])) {
    $email = trim($_POST['email']);

    // Basic email validation
    if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
        // Sanitize the email to prevent any injection attacks
        $email = filter_var($email, FILTER_SANITIZE_EMAIL);

        // Format the data to save (email + timestamp)
        $data_to_save = "Email: " . $email . " - Date: " . date('Y-m-d H:i:s') . PHP_EOL;

        // Save the email to the text file.
        // FILE_APPEND flag adds to the file instead of overwriting it.
        // LOCK_EX flag prevents others from writing to the file at the same time.
        file_put_contents($email_file, $data_to_save, FILE_APPEND | LOCK_EX);

        // All done, now redirect to the affiliate site.
        header('Location: ' . $affiliate_url);
        exit(); // Always call exit after a header redirect

    } else {
        // If the email is invalid, maybe redirect them anyway or show an error.
        // For simplicity, we'll redirect them anyway.
        header('Location: ' . $affiliate_url);
        exit();
    }
} else {
    // If no email was provided, just redirect to the main page or the affiliate site.
    // Let's send them back to the homepage.
    header('Location: index.php');
    exit();
}
?>