-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_request.php
48 lines (41 loc) · 1.06 KB
/
test_request.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
// CubicleSoft miscellaneous web request dependent classes test.
// (C) 2018 CubicleSoft. All Rights Reserved.
// Temporary root.
$rootpath = str_replace("\\", "/", dirname(__FILE__));
require_once $rootpath . "/support/request.php";
?>
<html>
<head><title>Test</title></head>
<body>
<h4>$_REQUEST keys before:</h4>
<ul>
<?php
foreach ($_REQUEST as $key => $val)
{
echo htmlspecialchars($key) . "<br>";
}
?>
</ul>
<h4>$_REQUEST keys after:</h4>
<ul>
<?php
Request::Normalize();
foreach ($_REQUEST as $key => $val)
{
echo "<li>" . htmlspecialchars($key) . "</li>";
}
?>
</ul>
<?php
if (Request::IsSSL()) echo "<h4>Request is:</h4><div style=\"margin-left: 2.5em;\">HTTPS</div>";
else echo "<h4>Request is:</h4><div style=\"margin-left: 2.5em;\">HTTP</div>";
?>
<h4>Full request URL bases:</h4>
<ul>
<li><b>Default:</b> <?=htmlspecialchars(Request::GetFullURLBase())?></li>
<li><b>HTTP:</b> <?=htmlspecialchars(Request::GetFullURLBase("http"))?></li>
<li><b>HTTPS:</b> <?=htmlspecialchars(Request::GetFullURLBase("hTtPs"))?></li>
</ul>
</body>
</html>