I was wondering if there was a way to get at the raw HTTP request data in PHP running on apache that doesn\'t involve using any additional extensions. I\'ve seen the HTTP functi
Try this:
$request = $_SERVER['SERVER_PROTOCOL'] .' '. $_SERVER['REQUEST_METHOD'] .' '. $_SERVER['REQUEST_URI'] . PHP_EOL; foreach (getallheaders() as $key => $value) { $request .= trim($key) .': '. trim($value) . PHP_EOL; } $request .= PHP_EOL . file_get_contents('php://input'); echo $request;