Hi,
;-))))
Obviously you need an IP of the user that is connected on your site e/o page. Right?!!
& that's the right way to do it.
REMOTE_ADDR
If you're using that on your local "REMOTE" computer... it's not working that way. Your server has to be online to see that working.
You'll get nothing but a 127.0.0.1
HTH.
-Gord