PHP displaying an ip

I have been through many pages looking for a way to display an ip using php. Here is the code on most of the websites "<?php echo $REMOTE_ADDR; ?>
<? ", i tested this code on a wamp server and all it seems to come up with is something like 127.0.0.1, i dont know whether that is like an external ip address or something but i was wondering does anyone know how to display the users internal ip address of their machine?

<?php echo $_SERVER[‘REMOTE_ADDR’]; ?>

There is a lot of different methods n scripts i have tried to follow and i havent found one yet but thanks ill try that one

This is the only code you can trust.
It will show you client’s IP address. The only IP address available to web-server.
Though you need some network basics to understand what client (in the matters of TCP networking) is.

All these scripts and methods are just good for nothing.

127.0.0.1 will always show if you are running the PHP on the same computer that views it.

Thanks for that guys

$_SERVER[‘REMOTE_ADDR’] will not show a person’s actual IP address if they are using a proxy server.

It’s a pity, but that’s all we have.