我正在尝试实施付款处理器。一切正常,现在我想检查mpay24在重定向到sucessURL时发送的301重定向IP。
他们在这里描述: https://docs.mpay24.com/docs/test-and-productive-system
问题是如何检查重定向IP?这个ofc不起作用:
if(!empty($_SERVER['HTTP_CLIENT_IP'])){
//ip from share internet
$ip = $_SERVER['HTTP_CLIENT_IP'];
}elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){
//ip pass from proxy
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}else{
$ip = $_SERVER['REMOTE_ADDR'];
}
return $ip;