title: Get user's private IP address with PHP
body: <p>I've done a lot of research on how to get a user's private IP address. 
  I tried the following:</p>
  
  <pre><code>    $client = $_SERVER['HTTP_CLIENT_IP'];
      $forward = $_SERVER['HTTP_X_FORWARDED_FOR'];
      $remote = $_SERVER['REMOTE_ADDR'];
  
      if (filter_var( $client, FILTER_VALIDATE_IP))
      {
          $ip_address = $client;
      }
      elseif (filter_var($forward, FILTER_VALIDATE_IP))
      {
          $ip_address = $forward;
      }
      else
      {
          $ip_address = $remote;
      }
      echo $ip_address;
  }
  </code></pre>
  
  <p>I got a public IP address. My site keeps getting the same IP address for devices under a network.</p>
  
  <p>How do I get the private IP address of a user?</p>