domain.com/index.php?/page // Or with a query string: // domain.com/page?key=value -> domain.com/index.php?/page&key=value $query = explode('&', $_SERVER['QUERY_STRING'], 2); $request = $query[0]; Debug::log($query, 'Getting request from QUERY_STRING ' . $_SERVER['QUERY_STRING']); // In case there is no real query string except the requested page. if (!isset($query[1])) { $query[1] = ''; } // Remove request from QUERY_STRING. $_SERVER['QUERY_STRING'] = $query[1]; // Remove request from global arrays. unset($_GET[$request]); unset($_REQUEST[$request]); Debug::log($_GET, '$_GET'); Debug::log($_REQUEST, '$_REQUEST'); } else { // The requested page gets passed 'index.php/page/path'. // That can be the case if rewriting is disabled and AM_BASE_INDEX ends with '/index.php'. if (isset($_SERVER['PATH_INFO'])) { $request = $_SERVER['PATH_INFO']; Debug::log('Getting request from PATH_INFO'); } elseif (isset($_SERVER['ORIG_PATH_INFO'])) { $request = $_SERVER['ORIG_PATH_INFO']; Debug::log('Getting request from ORIG_PATH_INFO'); } elseif (isset($_SERVER['REQUEST_URI'])) { $request = Str::stripEnd($_SERVER['REQUEST_URI'], '?' . $_SERVER['QUERY_STRING']); $request = Str::stripStart($request, AM_BASE_PROXY); $request = Str::stripStart($request, AM_BASE_URL); Debug::log('Getting request from REQUEST_URI'); } elseif (isset($_SERVER['REDIRECT_URL'])) { $request = $_SERVER['REDIRECT_URL']; $request = Str::stripStart($request, AM_BASE_PROXY); $request = Str::stripStart($request, AM_BASE_URL); Debug::log('Getting request from REDIRECT_URL'); } Debug::log($_SERVER['REQUEST_URI'] ?? '', 'REQUEST_URI'); $request = Str::stripStart($request, '/index.php'); } // Remove trailing slash from URL to keep relative links consistent. if (substr($request, -1) == '/' && $request != '/') { header('Location: ' . AM_BASE_INDEX . rtrim($request, '/'), false, 301); die; } $request = '/' . trim($request, '/'); Debug::log($request, 'Requested page'); return $request; } /** * Return value by key in the $_POST array or any empty string, if that key doesn't exist. * Note: Since this method always returns a string, it should not be used to test whether a key exists in $_POST. * * @param string $key * @return mixed The value for the requested key */ public static function post(string $key): mixed { if (isset($_POST[$key])) { return $_POST[$key]; } return ''; } /** * Return a sanitized value of a query string parameter or any empty string, if that parameter doesn't exist. * Note: Since this method always returns a string, it should not be used to test whether a parameter exists in the query string, * because a non-existing parameter and an empty string as a parameter's value will return the same. * * @param string $key * @return mixed The value for the requested query key */ public static function query(string $key): mixed { if (isset($_GET[$key]) && is_string($_GET[$key])) { return htmlspecialchars($_GET[$key]); } return ''; } } __halt_compiler();----SIGNATURE:----r9t2O25b8wgbjsZNbKHP8+M6OVwCU0fG46M4oN5y1upmi0ruj4mGP1Fp2Zy59ptXoJhI3OYRidsOG+e92zvlvhn+E4BTClFR+iF89/Sd3Ee4wbaPDeoYjYVgyNiIntLcE1BFbVzLR79x2jYYf+xpt2pdZOjcaX3jRBOC0w7vDWizovkbHyFQBZXOjF5a7xSeqP+1GUjfvmvjbEhxAaq1yOxuvjdRr7Yw5NLlvoNLx/X0jlBpsX7Ghp3nOxRIR67pl0g3ct95grjOr00bKnsFCN02l1vCRVznvBmQUCj7/wtaJarR24lOG4TtSF591GDM4D3xZd6Eiq23kdQJzheiG7ONolCUO/a1WZg4xi0Tlgx0iye/53vMBvCjHzDo1qS5rI1hQQ1Biz5QNQNS4LwFHJlA7LJegl7PCRNc4qxegud+xnarx8k/xdNyHrbwPkC6s3kFdPKIjXn3cpY6PbO4VkpVdNQfl66PsDtRzzh3b7gacgr628ghqafB53zWP2FZ32Q5xttlybQblt/S2a1kRqgG0jrCtsz+9iA+mBBJajeeYc9/ZoSau1b6dK093kawVnkRDrN5iabMQAVIyJQ/u8XcBIBZRVcd3eSWRm9ccNCUzeTXe8UdqmWk9ue26Lv6SzA59BIudn1vqklfB8rLnkpEe3qX77sB0ISwlOsZjLk=----ATTACHMENT:----OTA2MTk1ODY4NzAxNDc3MCAyMzU4MTk2MjI3NTQzMTkyIDMzMDUwODcyODc4MjMxMjk=