<!DOCTYPE html>
<html>
<head>
<title>LSL Test Page</title>
</head>
<body>
<p>
<?php
$headers = apache_request_headers();
function test_input($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
if ($_SERVER["REQUEST_METHOD"] == "POST" && $headers["X-Secondlife-Shard"] == "Production")
{
$pdata=nl2br(implode("\n", $headers));
foreach ($headers as $header => $value)
{
$headersindiv.= "$header: $value <br />\n";
}
$input=file_get_contents("php://input");
$pdata = test_input($input);
$headersindiv.=$pdata;
$wfile = fopen("lslget.txt", "w") or die("Unable to open file!");
fwrite($wfile, $headersindiv);
fclose($wfile);
$file='lslget.txt';
if(filesize($file)>0)
{
$readfile=fopen($file, "r") or die("Unable to open file!");
echo fread($readfile,filesize($file));
fclose($readfile);
}
}
?>
</p>
</body>
</html>