Skip to content

Instantly share code, notes, and snippets.

@dyangrev
Created May 2, 2014 23:37
Show Gist options
  • Save dyangrev/eb7a375ebdb7278a273b to your computer and use it in GitHub Desktop.
Save dyangrev/eb7a375ebdb7278a273b to your computer and use it in GitHub Desktop.
CODE:
<?php
$header = apache_request_headers();
$request_body = @file_get_contents(STDIN);
$f = fopen('/tmp/test-request' . date('Y-m-d-h:i:s'), 'a+');
fwrite($f, json_encode($header) . PHP_EOL);
$body = file_get_contents('php://input');
fwrite($f, $body . PHP_EOL);
fwrite($f, json_encode($_POST) . PHP_EOL);
fclose($f);
PROD:
{"Accept":"*\/*","Content-Length":"1095","Expect":"100-continue","Content-Type":"multipart\/form-data; boundary=----------------------------e4c1d4718683","True-Client-IP":"54.197.133.82","Pragma":"no-cache","X-Akamai-CONFIG-LOG-DETAIL":"true","TE":"chunked;q=1.0","Connection":"close","Accept-Encoding":"gzip","Akamai-Origin-Hop":"2","Via":"1.1 v1-akamaitech.net(ghost) (AkamaiGHost), 1.1 akamai.net(ghost) (AkamaiGHost)","X-Forwarded-For":"54.197.133.82, 184.27.179.186, 96.17.145.31","Host":"inguest.revinate.com","Cache-Control":"no-cache, max-age=0"}
[]
STAGE:
{"Host":"inguest-stage.revinate.com","Accept":"*\/*","Content-Length":"1095","Expect":"100-continue","Content-Type":"multipart\/form-data; boundary=----------------------------4f6b646a4589","X-Forwarded-For":"54.197.133.82","Connection":"close"}
{"custID":"6354304","message":"stop","keyword":"avertine1","mobileNum":"4152691983","optInStatus":"opt-in","timeStamp":"2014-02-05 16:35:08","subacct":"453","custName":"Daiyi","msgID":"4486553","subacct_name":"avertine"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment