Skip to content

Instantly share code, notes, and snippets.

View trueqap's full-sized avatar
🎯
Focusing

TrueQAP trueqap

🎯
Focusing
View GitHub Profile
@trueqap
trueqap / dumprequest.php
Created April 22, 2022 14:16 — forked from magnetikonline/dumprequest.php
PHP script to dump full HTTP request to file (method, HTTP headers and body).
<?php
// https://gist.github.com/magnetikonline/650e30e485c0f91f2f40
class DumpHTTPRequestToFile {
public function execute($targetFile) {
$data = sprintf(
"%s %s %s\n\nHTTP headers:\n",
$_SERVER['REQUEST_METHOD'],
$_SERVER['REQUEST_URI'],
$_SERVER['SERVER_PROTOCOL']