后端开发
网络新概念,云计算、大数据、O2O、电商。。。。
网络新概念,云计算、大数据、O2O、电商。。。。
2018-09-28 17:30:01
记录访问信息:
//用户访问记录 $address = $_SERVER['REMOTE_ADDR']; $referer = $_SERVER['HTTP_REFERER']; $browser = $_SERVER['HTTP_USER_AGENT']; $data=file_get_contents("php://input"); $url='http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']; $file = fopen("D:/xxx/xxx/log.html", "a"); $time = date("H:i dS F"); fwrite( $file, "<b>时间:</b> $time<br>" ); if( $address != null) { fwrite( $file, "<b>IP Address:</b> $address <br>"); } if( $referer != null) { fwrite( $file, "<b>来源:</b> $referer<br>"); } fwrite( $file, "<b>浏览器:</b> $browser<br/><hr>"); fwrite( $file, "<b>data:</b> $data<br/><hr>"); fwrite( $file, "<b>url:</b> $url<br/><hr>"); fclose($file);
上一篇:微信公众号开发获取openid