Answer the question
In order to leave comments, you need to log in
Display user's ip address?
Guys tell me how to display the ip address of the user? I try like this:
echo '<br> IP адрес';
echo $_SERVER["REMOTE_ADDR"];
Answer the question
In order to leave comments, you need to log in
function GET_RealIP() {
if (!empty($_SERVER['HTTP_CLIENT_IP'])) $ip=$_SERVER['HTTP_CLIENT_IP'];
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
} else $ip=$_SERVER['REMOTE_ADDR'];
return $ip;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question