CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 1999
    Location
    India
    Posts
    8

    How do I get the IP address of a Local System

    I need to get the IP address of the System in C or C++


  2. #2
    Guest

    Re: How do I get the IP address of a Local System

    128.0.0.1


  3. #3
    Guest

    Re: How do I get the IP address of a Local System

    What the answer is yours... ???
    I want a C code which gives the Ip address of a system!


  4. #4
    Join Date
    May 1999
    Location
    Romania
    Posts
    70

    Re: How do I get the IP address of a Local System

    there is a dedicated address for local hosts and it's 127.0.0.1 not 128.0.0.1 as i've seen in the first reply. it's usualy used for tests. if you are looking for something about your computer not a simply IPaddress use 'getenv(<arg&gt' where <arg> could be 'REMOTE_ADDR' (for your question) or some other enviroment variable. to find all specific enviroment variable for your computer just travers '_environ' which has 'char**' type.
    use 'char** myEnv = _environ; while(*myEnv){ ...myEnv++} ' etc. ...


  5. #5
    Guest

    Re: How do I get the IP address of a Local System

    I think he was referring to a perl CGI script.

    Anarchos


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured