记录访问时间,访问ip,post数据,get数据,php://inpu数据,headers头部数据。

require '../../../zb_system/function/c_system_base.php';
$zbp->Load();
$f = $zbp->logsdir . '1.txt';
$handle = @fopen($f, 'a+');
$t = date('Y-m-d') . ' ' . date('H:i:s') . ' ' . substr(microtime(), 1, 9) . ' ' . date('P');
$ip = GetGuestIP();
@fwrite($handle, '[' . $t . ']' . "\r\n");
@fwrite($handle, 'ip='.$ip . "\r\n");
$cc=var_export($_POST, true);
if($cc) @fwrite($handle, 'post='.$cc . "\r\n");
$cc=var_export($_GET, true);
if($cc) @fwrite($handle, 'get='.$cc . "\r\n");
$cc=file_get_contents('php://input');
if($cc) @fwrite($handle, 'input='.$cc . "\r\n");
$headers = apache_request_headers();
$cc=var_export($headers, true);
@fwrite($handle, 'HEADER='.$cc."\r\n");
@fclose($handle);