Skip to content

Instantly share code, notes, and snippets.

@dgreen
Created May 7, 2019 03:57
Show Gist options
  • Save dgreen/b2bcd6d7eebfe0c5297ce31ee5b17596 to your computer and use it in GitHub Desktop.
Save dgreen/b2bcd6d7eebfe0c5297ce31ee5b17596 to your computer and use it in GitHub Desktop.
Simple PHP script to show data available to it
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Displaying results of activation</title>
</head>
<body>
<h1>Results of Activation</h1>
<?php
if (! empty($_GET)) {
echo "<h2>Parameters submitted by HTTP GET</h2>";
echo "<pre><code>\n";
foreach($_GET as $key => $value) {
echo "$key = $value\n";
}
echo "</code></pre>";
}
if (! empty($_POST)) {
echo "<h2>Parameters submitted by HTTP POST</h2>";
echo "<pre><code>\n";
foreach($_POST as $key => $value) {
echo "$key = $value\n";
}
echo "</code></pre>";
}
if (! empty($_SERVER)) {
echo "<h2>Parameters from web server</h2>";
echo "<pre><code>\n";
foreach($_SERVER as $key => $value) {
echo "$key = $value\n";
}
echo "</code></pre>";
}
if (! empty($_ENV)) {
echo "<h2>Server's Environmental Variables</h2>";
echo "<pre><code>\n";
foreach($_ENV as $key => $value) {
echo "$key = $value\n";
}
echo "</code></pre>";
}
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment