Skip to content

Instantly share code, notes, and snippets.

Avatar

Patryk patrys666

View GitHub Profile
@patrys666
patrys666 / dumprequest.php
Created Jan 27, 2021 — forked from magnetikonline/dumprequest.php
PHP script to dump full HTTP request to file (method, HTTP headers and body).
View dumprequest.php
<?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'],