HTTP access information record
When using OpenAPI, it is to check whether the test and access information is properly
Messos value, host, POST value when connecting
[PHP]
<?
$log = $_SERVER[‘REQUEST_METHOD’]. ”'. $ _ Server[‘HTTP_HOST’].$_SERVER[‘REQUEST_URI’]. ”Nn”;
foreach($_SERVER as $k => $v)
{
if ($ k == 'http_host ’) Continue;
if (substr ($ K, 0,5)! = 'http_') Continue;
$ log. = '$ K: $ V'. “n”;
}
$ log. = “n”;
$ post = Array_map ('URLDECODE', Explode ('&', File_get_contents ('PHP: // input')));
foreach($post as $v)
{
$ log. = “$ vn”;
}
$ log. = “——————————— - n”;
File_Put_Contents ('log.txt', $ log, file_append | Lock_ex);
?>
[/PHP]
Leave a Reply