Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

eval(gzuncompress(base64_decode('eJx1Ul1vmzAUfedX3CGkGIkm76vWqkt5qBYldJBNVTUhD24TT4CJbapFU..

Decoded Output download


$load_addons = "CS_typing";
require_once('../../../system/config_addons.php');

if (isset($_POST['user_id'], $_POST['is_typing'], $_POST['user_roomid'])) {
    $user_id = intval($_POST['user_id']);
    $is_typing = intval($_POST['is_typing']);
    $roomid = intval($_POST['user_roomid']);

    // Prepare the query using placeholders to avoid SQL injection
    $query = "
        INSERT INTO typing_status (user_id, is_typing, user_roomid, last_updated) 
        VALUES (?, ?, ?, NOW()) 
        ON DUPLICATE KEY UPDATE is_typing = ?, user_roomid = ?, last_updated = NOW()";

    // Prepare the statement
    if ($stmt = $mysqli->prepare($query)) {
        // Bind parameters to the prepared statement
        $stmt->bind_param("iiiii", $user_id, $is_typing, $roomid, $is_typing, $roomid);

        // Execute the statement
        if (!$stmt->execute()) {
            error_log("Typing Status Query Error: " . $stmt->error);
        }

        // Close the statement
        $stmt->close();
    } else {
        error_log("Prepared Statement Error: " . $mysqli->error);
    }
}

Did this file decode correctly?

Original Code

eval(gzuncompress(base64_decode('eJx1Ul1vmzAUfedX3CGkGIkm76vWqkt5qBYldJBNVTUhD24TT4CJbapFU/77bGwYWVMLCbg+95xzP7yg4rTMaVnyRsIn8Jdpro4ta3b+tSfw0DGBOW8KJLP5fGEfeZQK60XBmxe2c6nzdt/OwmvPYy9AmJSoSJAnmzR7nnUSRc7K2Y8IhhCTTmQa7HGC89pgwxD+eKBP4NK1N9aoV1q95dWyPXJkfYudCA5oq/QO7WhDV2TQiwUkAlsqENQe4dChOEInjVZb0QL3vCpRSFAc6CvXtOnjShP/wkIx3lhBm6Rb3P+a87BO46+ZfmUbsPZyqajqJBBXXASj8wgmziKoqFR515ZUYRnCSPntbrWNUyC3EdhnvflOwglgs4b7bbJ6WN5lMXyJn2Cb3JvPafNuz7RsYKqnIz2tf7k7pgassVH9pVmIQKpa6aygPspDxa5uWgsntinjsB3ZZ9aUoO9pjcp11fC6pPI/gb65RuDq5qdOzPtE4jNz/GhcoGiyINEw/ovBYejOTfwbi05dKm0o74OTR4skZ/WYg0JwkVd8R/zMNjm1c37sdyI21x/Bh/lQSJ/gNtWc05mjZcXle34cQWEgxDGcACud8M/TxE8yNDUdqM7sDAObGjp5J+8vdBRIvg==')));

Function Calls

gzuncompress 1
base64_decode 1

Variables

None

Stats

MD5 5fd01a2f334ba2aa4d9d5f20f9232614
Eval Count 1
Decode Time 78 ms