website/dump_request.php
2022-07-10 11:20:04 +02:00

11 lines
384 B
PHP

<?php
header("Content-Type: text/plain");
echo "{$_SERVER['REQUEST_METHOD']} {$_SERVER['REQUEST_URI']} {$_SERVER['SERVER_PROTOCOL']}\r\n\r\n";
foreach ($_SERVER as $name => $value)
if (substr($name, 0, 5) == 'HTTP_')
echo str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5))))) . ": $value\r\n";
echo "\r\n" . file_get_contents('php://input');