Actual IP Address

What is my IP address right now?

Sometimes, for some reason, you need to know what your IP address is.

IP addresses can be static or dynamic. A static IP address is the same all the time.

A dynamic IP address is changed by a DHCP server, and for this change, there is no fixed time interval; it can happen tomorrow, in one month, or in a year.

So, what is your actual IP address? It is this one:

18.97.9.171

Are you interested in the PHP code used? Here is the snippet:

<?php
function getUserIP()
{
    $client = @$_SERVER['HTTP_CLIENT_IP'];
    $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
    $remote = $_SERVER['REMOTE_ADDR'];
    if (filter_var($client, FILTER_VALIDATE_IP)) {
        $ip = $client;
    } elseif (filter_var($forward, FILTER_VALIDATE_IP)) {
        $ip = $forward;
    } else {
        $ip = $remote;
    }
    return $ip;
}
$user_ip = getUserIP();
echo $user_ip;
?>