I am a .NET programmer and I am across an issue related to finding the IP address of the client computer. It is not tough to find that but the challenge comes if the client is hiding behind any proxy server or any gateway. What am I supposed to do if I want to find the IP of the client in such case. I have searched the net regarding the matter but haven't come across anything helpful yet. or anything else? Any input in the matter will be helpful, be it any tool or new technology that I have to follow or any book/journal I have to refer or any URL that shall I visit. I don't know where and how to go ahead in the matter. Please help
A little bit about your IP address (Internet Protocol address). When you connect to the internet, either via your internet service provider (AOL, Prodigy, etc.), or your office LAN connection, you are assigned an IP address. This address identifies your computer from the other computers on the internet. Your IP address can be either static, meaning it never changes, or dynamic, meaning each time you dial-in or login you are assigned a new address for that session. Check with your internet service provider or network administrator to find out if your computer uses static or dynamic IP addressing. The commands below will show you the IP address of your computer. If you use a home router to connect to the Internet, the IP shown from these commands will not be your public IP address (it will be your internal IP address). Internal IP address start with a 10.10 or 192.168. If you want to see your settings, in Windows 95/98 try the following: Go to Start/Run and do the command winipcfg That will bring up a network screen with your values. Windows 2000, XP, Vista you can go to a command prompt and do: ipconfig On the Macintosh to get your IP address try the following: Apple Menu --> Control Panels --> TCP/IP Control Panel On Mac OS X: 1. Open system preferences 2. Under internet and network, click 'network' It will show you your IP address.. If you receive a dynamic IP address from your internet provider, it will likely be different on your next session. So if you need your IP address for later use, please check when you log on for that session.
Well thanks for the reply anilagrawal, but I want to find the IP of client computer using which users visit my site.
function userIP() { $userIP = $_SERVER['HTTP_X_FORWARDED_FOR']; if($userIP == "") { $userIP = $_SERVER['REMOTE_ADDR']; } return $userIP; } PHP:
you need some client side application like a java applet or flash to make a request without using the proxy. This is possible and done on bank websites and some commerce web sites. Nothing complicated, if you know java it should be easy. I'm not going to say anything about flash (except I know it's also possible there) because I don't code in it. Edit: don't waste your time with javascript because it can't bypass browser settings.