Universal HTTP request receiver & logger written in pure PHP
server-http-logger is a lightweight, zero-dependency PHP endpoint that captures and logs everything about incoming HTTP requests. Making it ideal for debugging, webhook inspection, API testing, reverse proxy diagnostics, and security analysis.
Each request is stored in its own unique, timestamped directory, ensuring clean separation and easy inspection.
- Captures GET parameters
- Captures POST form data
- Captures raw request body
- Automatically detects and parses JSON payloads
- Captures HTTP headers
- Captures cookies
- Captures server & environment variables
- Handles single and multiple file uploads
- Stores each request in an isolated directory
- High-precision timestamps (microseconds)
- No database required
- No framework required
- Pure PHP (works on shared hosting)
Each request is saved under:
uploads/
└── YYYY-MM-DD/
└── HH-MM-SS.micro_RANDOMID/
├── meta.json
├── headers.json
├── get.json
├── post.json
├── cookies.json
├── server.json
├── raw_body.bin
├── json_body.json
└── files/
├── file_1_example.png
└── file_2_document.pdf
| File | Description |
|---|---|
meta.json |
Request metadata (timestamp, method, IP, URI, content type, etc.) |
headers.json |
All HTTP request headers |
get.json |
Query string parameters |
post.json |
POST form fields |
cookies.json |
Cookies sent by the client |
server.json |
Full $_SERVER environment dump |
raw_body.bin |
Raw request body (binary safe) |
json_body.json |
Parsed JSON body (only if valid JSON) |
files/ |
Uploaded files (supports multiple uploads) |
- Clone or download the repository:
git clone https://github.com/BaseMax/server-http-logger.git-
Upload the project to your server.
-
Ensure the
uploadsdirectory is writable:
chmod -R 0777 uploads- Point your web server to
index.php.
That’s it — no additional configuration required.
curl "https://your-domain.com/index.php?foo=bar&x=123"curl -X POST https://your-domain.com/index.php \
-d "username=test&password=secret"curl -X POST https://your-domain.com/index.php \
-H "Content-Type: application/json" \
-d '{"event":"payment","amount":100}'curl -X POST https://your-domain.com/index.php \
-F "file=@example.png"{
"status": "ok",
"saved_to": "/path/to/uploads/2025-12-22/14-33-21.123456_ab12cd34",
"timestamp": "2025-12-22T14:33:21+00:00"
}- Webhook debugging (Stripe, PayPal, GitHub, Telegram, etc.)
- Inspecting third-party API callbacks
- Reverse proxy testing
- Mobile app request inspection
- Security research and request forensics
- Development and QA environments
- This tool logs everything.
- Do not expose it publicly in production without access controls.
- Protect the endpoint using IP restrictions, authentication, or firewall rules if needed.
- Stored data may contain sensitive information.
- PHP 7.2 or higher
- Writable filesystem
- No extensions required beyond standard PHP
This project is licensed under the MIT License.
Seyyed Ali Mohammadiyeh (Max Base)
You are free to use, modify, and distribute it.