how t0 i get the local system Ip Address using PHP
<p>i am accessing webserver via Internet and not via local network then how to i get the ip address of my local system i am already try this with </p>

<pre><code>GATEWAY_INTERFACE = &lt;?php echo $_SERVER['GATEWAY_INTERFACE']; ?&gt; &lt;br&gt;
SERVER_ADDR = &lt;?php echo $_SERVER['SERVER_ADDR']; ?&gt; &lt;br&gt;
SERVER_NAME = &lt;?php echo $_SERVER['SERVER_NAME']; ?&gt; &lt;br&gt;
SERVER_SOFTWARE = &lt;?php echo $_SERVER['SERVER_SOFTWARE']; ?&gt; &lt;br&gt;
SERVER_PROTOCOL = &lt;?php echo $_SERVER['SERVER_PROTOCOL']; ?&gt; &lt;br&gt;
REQUEST_METHOD = &lt;?php echo $_SERVER['REQUEST_METHOD']; ?&gt; &lt;br&gt;
REQUEST_TIME = &lt;?php echo $_SERVER['REQUEST_TIME']; ?&gt; &lt;br&gt;
QUERY_STRING = &lt;?php echo $_SERVER['QUERY_STRING']; ?&gt; &lt;br&gt;
DOCUMENT_ROOT = &lt;?php echo $_SERVER['DOCUMENT_ROOT']; ?&gt; &lt;br&gt;
HTTP_ACCEPT = &lt;?php echo $_SERVER['HTTP_ACCEPT']; ?&gt; &lt;br&gt;
HTTP_ACCEPT_CHARSET = &lt;?php echo $_SERVER['HTTP_ACCEPT_CHARSET']; ?&gt; &lt;br&gt;
HTTP_ACCEPT_ENCODING = &lt;?php echo $_SERVER['HTTP_ACCEPT_ENCODING']; ?&gt; &lt;br&gt;
HTTP_ACCEPT_LANGUAGE = &lt;?php echo $_SERVER['HTTP_ACCEPT_LANGUAGE']; ?&gt; &lt;br&gt;
HTTP_CONNECTION = &lt;?php echo $_SERVER['HTTP_CONNECTION']; ?&gt; &lt;br&gt;
HTTP_HOST = &lt;?php echo $_SERVER['HTTP_HOST']; ?&gt; &lt;br&gt;
HTTP_REFERER = &lt;?php echo $_SERVER['HTTP_REFERER']; ?&gt; &lt;br&gt;
HTTP_USER_AGENT = &lt;?php echo $_SERVER['HTTP_USER_AGENT']; ?&gt; &lt;br&gt;
HTTPS = &lt;?php echo $_SERVER['HTTPS']; ?&gt; &lt;br&gt;
REMOTE_ADDR = &lt;?php echo $_SERVER['REMOTE_ADDR']; ?&gt; &lt;br&gt;
REMOTE_HOST = &lt;?php echo $_SERVER['REMOTE_HOST']; ?&gt; &lt;br&gt;
REMOTE_PORT = &lt;?php echo $_SERVER['REMOTE_PORT']; ?&gt; &lt;br&gt;
SCRIPT_FILENAME = &lt;?php echo $_SERVER['SCRIPT_FILENAME']; ?&gt; &lt;br&gt;
SERVER_ADMIN = &lt;?php echo $_SERVER['SERVER_ADMIN']; ?&gt; &lt;br&gt;
SERVER_PORT = &lt;?php echo $_SERVER['SERVER_PORT']; ?&gt; &lt;br&gt;
SERVER_SIGNATURE = &lt;?php echo $_SERVER['SERVER_SIGNATURE']; ?&gt; &lt;br&gt;
PATH_TRANSLATED = &lt;?php echo $_SERVER['PATH_TRANSLATED']; ?&gt; &lt;br&gt;
SCRIPT_NAME = &lt;?php echo $_SERVER['SCRIPT_NAME']; ?&gt; &lt;br&gt;
REQUEST_URI = &lt;?php echo $_SERVER['REQUEST_URI']; ?&gt; &lt;br&gt;
PHP_AUTH_DIGEST = &lt;?php echo $_SERVER['PHP_AUTH_DIGEST']; ?&gt; &lt;br&gt;
PHP_AUTH_USER = &lt;?php echo $_SERVER['PHP_AUTH_USER']; ?&gt; &lt;br&gt;
PHP_AUTH_PW = &lt;?php echo $_SERVER['PHP_AUTH_PW']; ?&gt; &lt;br&gt;
AUTH_TYPE = &lt;?php echo $_SERVER['AUTH_TYPE']; ?&gt; &lt;br&gt;


( and )

&lt;html&gt;
&lt;head&gt;
 &lt;title&gt;What is my IP address?&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;?php

    if (getenv(HTTP_X_FORWARDED_FOR)) {
        $pipaddress = getenv(HTTP_X_FORWARDED_FOR);
        $ipaddress = getenv(REMOTE_ADDR);
echo "Your Proxy IPaddress is : ".$pipaddress. "(via $ipaddress)" ;
    } else {
        $ipaddress = getenv(REMOTE_ADDR);
        echo "Your IP address is : $ipaddress";
    }
?&gt;
&lt;/body&gt;
&lt;/html&gt;  
</code></pre>

<p>but no use it just give the server Ip. Please guide me</p>
