-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
echo.php
28 lines (28 loc) · 904 Bytes
/
echo.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
<?php
header("Content-Type: text/html");
header("Access-control: allow <*>");
echo "<?xml version=\"1.0\"?>";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
echo "<head>";
echo "<title>Results from echo.php</title>";
echo "</head>";
echo "<body>";
echo "<h1>Form posted data</h1>";
$posteddata = file_get_contents("php://input");
$posteddata = str_replace("&", "&", $posteddata);
$posteddata = str_replace("<", "<", $posteddata);
$posteddata = str_replace(">", ">", $posteddata);
echo "<pre>$posteddata</pre>";
echo "<h1>Environment variables</h1>";
echo "<pre>";
$env = $_ENV;
ksort($env);
foreach($env as $key => $value) {
if(substr($key,0,8) == "CONTENT_" || substr($key,0,5) == "HTTP_" || substr($key,0,8) == "REQUEST_" || $key == "QUERY_STRING") {
echo "$key=$value\n";
}
}
echo "</pre>";
echo "</body>";
echo "</html>";
?>