HTTP访问信息记录
使用OpenAPI时,是检查测试和访问信息是否正确
连接时的Messos值,主机,发布值
[PHP]
<?
$log = $_SERVER[‘REQUEST_METHOD’]。”'。$ _服务器[‘HTTP_HOST’].$_SERVER[‘REQUEST_URI’]。” nn”;
foreach($_SERVER as $k => $v)
{
如果($ k =='http_host’)继续;
如果(substr($ k,0,5)!='http_')继续;
$ log。='$ k:$ v'。“ n”;
}
$ log。=“ n”;
$ post = array_map('uroldecode',eskex('&',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