Skip to content

Instantly share code, notes, and snippets.

View patrys666's full-sized avatar

Patryk patrys666

View GitHub Profile
@patrys666
patrys666 / dumprequest.php
Created January 27, 2021 11:52 — 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'],