How to find IP address

Discussion in 'Programming' started by Packer, Dec 14, 2008.

  1. #1
    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
     
    Packer, Dec 14, 2008 IP
  2. anilagrawal

    anilagrawal Peon

    Messages:
    4
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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.
     
    anilagrawal, Dec 14, 2008 IP
  3. php_man

    php_man Guest

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    good i see this after that
     
    php_man, Dec 14, 2008 IP
  4. Packer

    Packer Member

    Messages:
    69
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    48
    #4
    Well thanks for the reply anilagrawal, but I want to find the IP of client computer using which users visit my site.
     
    Packer, Dec 14, 2008 IP
  5. hkp819

    hkp819 Guest

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanks for that post.
    To detect the ip address is good topic which is helpful to all the person.
     
    hkp819, Dec 15, 2008 IP
  6. 11Sale

    11Sale Banned

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    if someone is visiting from behind a proxy, you can get that proxy ip only, not the actual one.
     
    11Sale, Dec 16, 2008 IP
  7. farad

    farad Peon

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    function userIP()
    {
         $userIP = $_SERVER['HTTP_X_FORWARDED_FOR'];
         if($userIP == "")
              {
              $userIP = $_SERVER['REMOTE_ADDR'];
              } 
         return $userIP;
    }
    PHP:
     
    farad, Dec 16, 2008 IP
  8. pitagora

    pitagora Peon

    Messages:
    247
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #8
    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.
     
    pitagora, Dec 17, 2008 IP
  9. hkp819

    hkp819 Guest

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    thanks for that information.........
     
    hkp819, Dec 18, 2008 IP