php获取客户端ip地址方法
方法一:
//获取ip地址函数
function GetIP(){
if(!empty($_SERVER[“HTTP_CLIENT_IP”]))
$ip = $_SERVER[“HTTP_CLIENT_IP”];
else if(!empty($_SERVER[“HTTP_X_FORWARDED_FOR”]))
$ip = $_SERVER[“HTTP_X_FORWARDED_FOR”];
else if(!empty($_SERVER[“REMOTE_ADDR”]))[……]