title: How to get remote ip Address in magento?
body: <p>i used following code to display remote ip address</p>
  
  <pre><code>    $ip = $_SERVER["REMOTE_ADDR"];
      echo $ip;
  </code></pre>
  
  <p>and the following code also</p>
  
  <pre><code>     function get_client_ip() {
  $ipaddress = '';
  if (getenv('HTTP_CLIENT_IP'))
      $ipaddress = getenv('HTTP_CLIENT_IP');
  elseif(getenv('HTTP_X_FORWARDED_FOR'))
      $ipaddress = getenv('HTTP_X_FORWARDED_FOR');
  elseif(getenv('HTTP_X_FORWARDED'))
      $ipaddress = getenv('HTTP_X_FORWARDED');
  else if(getenv('HTTP_FORWARDED_FOR'))
      $ipaddress = getenv('HTTP_FORWARDED_FOR');
  else if(getenv('HTTP_FORWARDED'))
      $ipaddress = getenv('HTTP_FORWARDED');
  else if(getenv('REMOTE_ADDR'))
      $ipaddress = getenv('REMOTE_ADDR');
  else
      $ipaddress = 'UNKNOWN';
  
  return $ipaddress;  } echo get_client_ip();  
  </code></pre>
  
  <p>but both code display this result  <code>::1</code>   </p>
  
  <p>plzzzzz help me friends! how to get remote IP address?</p>