Skip to content

Instantly share code, notes, and snippets.

@lennartvdd
Last active August 29, 2015 13:58
Show Gist options
  • Save lennartvdd/10024264 to your computer and use it in GitHub Desktop.
Save lennartvdd/10024264 to your computer and use it in GitHub Desktop.
Catch and write Raw POST data to file
<?php
$data = file_get_contents("php://input");
if(!$data)
die("Missing data");
file_put_contents("postdata_".date("Ymd_His")."_".uniqid().".txt", $data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment