How to log all GET POST data to a file?

+1 vote
2099 views
asked Jul 18, 2017 in General by labii
edited Jul 18, 2017
How to log all GET POST data to a file?

1 Answer

0 votes
answered Jul 18, 2017 by plc
Just do

file_put_contents('savedata.txt', file_get_contents('php://input'));

and make sure the file have sufficient ownership and permissions on the server.

Related questions

+2 votes
2 answers 4599 views
0 votes
1 answer 462 views
+2 votes
1 answer 123 views
asked Jun 13, 2016 in Magento by Arton
+1 vote
2 answers 992 views
0 votes
1 answer 410 views
+1 vote
1 answer 592 views
...