Skip to content

Instantly share code, notes, and snippets.

@dvddpl
Last active July 4, 2016 13:24
Show Gist options
  • Select an option

  • Save dvddpl/ef45ec4f2690789c454e8908ebfc614c to your computer and use it in GitHub Desktop.

Select an option

Save dvddpl/ef45ec4f2690789c454e8908ebfc614c to your computer and use it in GitHub Desktop.
<?php
date_default_timezone_set ( "Europe/Berlin" );
$data = file_get_contents('php://input');
$timestamp = date('Y-m-d H:i:s');
$log = $timestamp . ' ' . $data;
file_put_contents("/tmp/request.txt", $log . "\n", FILE_APPEND);
echo $log
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment