-2

Possible Duplicate:
How can I get the client's IP address in a PHP webservice?

I'm wanting to grab the IP Address from the user but I don't want to turn register globals on in my php.ini file. Is there a way to work around this and still grab the ip address?

Community
  • 1
  • 1
thank_you
  • 11,001
  • 19
  • 101
  • 185

1 Answers1

4

Register Globals is not required to obtain the IP Address, why would you think it is?

Get the IP:

$ip = $_SERVER['REMOTE_ADDR'];
MrCode
  • 63,975
  • 10
  • 90
  • 112