Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php // Get visitor details $ip = $_SERVER['REMOTE_ADDR']; // IP address $date = date(..
Decoded Output download
<?php
// Get visitor details
$ip = $_SERVER['REMOTE_ADDR']; // IP address
$date = date('Y-m-d'); // Current date
$timestamp = date('Y-m-d H:i:s'); // Current timestamp
$userAgent = $_SERVER['HTTP_USER_AGENT']; // User-Agent string
$port = $_SERVER['REMOTE_PORT']; // Port
// Parse device type from User-Agent
$deviceType = 'Unknown';
if (strpos($userAgent, 'Mobile') !== false) {
$deviceType = 'Mobile';
} elseif (strpos($userAgent, 'Tablet') !== false) {
$deviceType = 'Tablet';
} elseif (strpos($userAgent, 'Windows') !== false || strpos($userAgent, 'Macintosh') !== false || strpos($userAgent, 'Linux') !== false) {
$deviceType = 'Desktop';
}
// Log entry
$logEntry = "IP: $ip, Date: $date, Timestamp: $timestamp, Device: $deviceType, Port: $port
";
// Append to log file
file_put_contents('force.log', $logEntry, FILE_APPEND);
// Redirect to a URL
$redirectUrl = "https://google.com"; // Change this to your desired URL
header("Location: $redirectUrl");
exit(); // Ensure no further code is executed after the redirect
?>
Did this file decode correctly?
Original Code
<?php
// Get visitor details
$ip = $_SERVER['REMOTE_ADDR']; // IP address
$date = date('Y-m-d'); // Current date
$timestamp = date('Y-m-d H:i:s'); // Current timestamp
$userAgent = $_SERVER['HTTP_USER_AGENT']; // User-Agent string
$port = $_SERVER['REMOTE_PORT']; // Port
// Parse device type from User-Agent
$deviceType = 'Unknown';
if (strpos($userAgent, 'Mobile') !== false) {
$deviceType = 'Mobile';
} elseif (strpos($userAgent, 'Tablet') !== false) {
$deviceType = 'Tablet';
} elseif (strpos($userAgent, 'Windows') !== false || strpos($userAgent, 'Macintosh') !== false || strpos($userAgent, 'Linux') !== false) {
$deviceType = 'Desktop';
}
// Log entry
$logEntry = "IP: $ip, Date: $date, Timestamp: $timestamp, Device: $deviceType, Port: $port\n";
// Append to log file
file_put_contents('force.log', $logEntry, FILE_APPEND);
// Redirect to a URL
$redirectUrl = "https://google.com"; // Change this to your desired URL
header("Location: $redirectUrl");
exit(); // Ensure no further code is executed after the redirect
?>
Function Calls
date | 1 |
Stats
MD5 | f59f907565b3ca28991731f5e8c422fd |
Eval Count | 0 |
Decode Time | 59 ms |