December 31, 2011

How to get IP address?

Question by user362064

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

I want to get IP address of user who view the page. How can ?

Answer by Starx

You can use $_SERVER['REMOTE_ADDR'];

An example

$userIP = $_SERVER['REMOTE_ADDR'];

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!