Skip to content

Commit

Permalink
Log POST data
Browse files Browse the repository at this point in the history
  • Loading branch information
bpesquet committed May 5, 2016
1 parent f3290f0 commit 931cb27
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
vendor/
jswebsrv.log
*.log
3 changes: 3 additions & 0 deletions post_form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
$post = print_r($_POST, true);
file_put_contents("post_form.log", $post);
3 changes: 3 additions & 0 deletions post_json.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
$data = print_r(json_decode(file_get_contents('php://input'), true), true);
file_put_contents("post_json.log", $data);

0 comments on commit 931cb27

Please sign in to comment.