HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux vmi3050980 6.8.0-90-generic #91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 14:14:30 UTC 2025 x86_64
User: gurumedia_st_usr (1012)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/gurumedia_st_usr/data/www/gurumedia.store/frd-public/port-443/data.php
<?php
header('Content-Type: application/json');

/**
 * ==============================
 * Force POST only
 * ==============================
 */
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
    http_response_code(405);
    echo json_encode([
        'success' => false,
        'error'   => 'Only POST method allowed',
        'allowed' => ['POST']
    ]);
    exit;
}

/**
 * ==============================
 * Read Raw Input
 * ==============================
 */
$raw = file_get_contents('php://input');

if (!$raw) {
    http_response_code(400);
    echo json_encode([
        'success' => false,
        'error'   => 'Empty request body'
    ]);
    exit;
}

$data = json_decode($raw, true);

if (json_last_error() !== JSON_ERROR_NONE) {
    http_response_code(400);
    echo json_encode([
        'success' => false,
        'error'   => 'Invalid JSON',
        'json_error' => json_last_error_msg()
    ]);
    exit;
}

/**
 * ==============================
 * Success Response
 * ==============================
 */
echo json_encode([
    'success' => true,
    'message' => 'Request received successfully',
    'debug' => [
        'received_data' => $data,
        'request_ip'    => $_SERVER['REMOTE_ADDR'] ?? null,
        'server_ip'     => $_SERVER['SERVER_ADDR'] ?? null,
        'time'          => date('Y-m-d H:i:s')
    ]
], JSON_PRETTY_PRINT);