标签:style blog http color io for ar cti
1 // 获取客户端真实ip() 2 protected function getIP() 3 { 4 global $ip; 5 if (getenv("HTTP_CLIENT_IP")) 6 $ip = getenv("HTTP_CLIENT_IP"); 7 else if(getenv("HTTP_X_FORWARDED_FOR")) 8 $ip = getenv("HTTP_X_FORWARDED_FOR"); 9 else if(getenv("REMOTE_ADDR")) 10 $ip = getenv("REMOTE_ADDR"); 11 else $ip = "Unknow"; 12 return $ip; 13 }
标签:style blog http color io for ar cti
原文地址:http://www.cnblogs.com/mrcln/p/3915417.html