website/tools/dump_request.php

11 lines
384 B
PHP
Raw Permalink Normal View History

2022-07-10 10:20:04 +01:00
<?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');