码迷,mamicode.com
首页 >  
搜索关键字:remote_addr    ( 367个结果
nginx 日志格式
1 http { 2 3 log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 4 '$status $body_bytes_sent "$http_referer" ' 5 '"$http_user_ag.....
分类:其他好文   时间:2015-01-23 17:43:53    阅读次数:169
PHP中根据IP地址判断所在城市等信息
本篇文章由:http://xinpure.com/php-based-on-information-such-as-the-ip-address-in-your-city/获得IP地址在 PHP 中得到当前访问者的IP地址,还是比较简单的: $ip = $_SERVER['REMOTE_ADDR']...
分类:Web程序   时间:2015-01-22 00:06:54    阅读次数:214
client.c
#include #include #include #include #include #include int main(int argc, char *argv[]){ int client_sockfd; int len; struct sockaddr_in remote_addr; //...
分类:其他好文   时间:2015-01-19 22:35:20    阅读次数:125
在nginx日志的access log中记录post请求的参数值
背景:有时程序偶出现参数少了或没有提交到下一个链接Url里后出现问题,如何查呢,最好的办法是在nginx上的加post参数,以定位到问题才有可能对某个UIR的代码出现的问题进行排查。og_format access '$remote_addr - $remote_user [$time_local]...
分类:数据库   时间:2015-01-19 14:04:31    阅读次数:276
PHP 获取IP地址 获取当前时间 写文件
Mark一下 function WriteIPMark($strFile) { $ip=$_SERVER["REMOTE_ADDR"]; $str_date = date('Y-m-d H:i:s',time()); $fp = fopen($strFile, "a"); if($fp) { fwrite($fp,$ip); fwrite($fp," "); ...
分类:Web程序   时间:2015-01-14 21:27:48    阅读次数:213
asp.net获取网页客户端IP地址
第一种:Request.UserHostAddress; //获取IP第二种:HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];第三种是获取部署地址的IP: string strHostName = System.Net.Dns.....
分类:Web程序   时间:2015-01-05 18:18:46    阅读次数:161
NGINX实现IF语句里的AND,OR多重判断
原理 就是用SET变量进行。AND 就用变量叠加,OR就用0或1切换。nginx的配置中不支持if条件的逻辑与/逻辑或运算 ,并且不支持if的嵌套语法,我们可以用变量的方式来实现:首先是伪代码(即不被nginx支持),写在这里只是为了方便理解:if ($remote_addr ~ "^(12.34|...
分类:其他好文   时间:2014-12-22 22:27:57    阅读次数:674
discuz中获取ip的函数
private function _get_client_ip() { $ip = $_SERVER['REMOTE_ADDR']; if (isset($_SERVER['HTTP_CLIENT_IP']) && preg_match('/^([0-9]{1,3}\...
分类:Web程序   时间:2014-12-09 12:05:49    阅读次数:269
default配置
log_format main '$remote_addr - $remote_user [$time_local] $request ' '"$status" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http...
分类:其他好文   时间:2014-11-26 20:27:28    阅读次数:187
基于lua页面访问限制控制(转载乌云)
if($cookie_say!="hbnl"){add_headerSet-Cookie"say=hbnl";rewrite.*"$scheme://$host$uri"redirect;}if($cookie_say!="hbnl$remote_addr"){add_headerSet-Cookie"say=hbnl$remote_addr";rewrite.*"$scheme://$host$uri"redirect;}rewrite_by_lua‘localrandom=ngx.var.cookie_r..
分类:其他好文   时间:2014-11-24 13:47:19    阅读次数:300
367条   上一页 1 ... 32 33 34 35 36 37 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!