<?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');