When you use "localhost" as your URL, its going to take your loop-back address which is 127.0.0.1
If i connected to your script, $HTTP_SERVER_VARS['REMOTE_ADDR'] will give you my real IP address, but since YOU are local its going to give you 127.0.0.1
I think you might have an option, do you know what your true IP address is? and are you using apache?
DC