CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: On the network

  1. #1
    Join Date
    Aug 2005
    Posts
    3

    Question On the network

    I would like to use one computer to read a file/a page (index.html) on another computer, then just would also like to read teh former's IP address. Something impossible to do in this small program ?
    Sorry, I am just very new to this, please help...
    Thank you so very much.
    It is a solution for your life and your job. Don't make things more complex with more contradictions.
    --walkingboots

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: On the network

    You want to read a file from another computer and get that computer's IP address?

    If so, this would need to be done with something other than scripting.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Aug 2005
    Posts
    3

    Re: On the network

    Quote Originally Posted by peejavery
    You want to read a file from another computer and get that computer's IP address?

    If so, this would need to be done with something other than scripting.
    Thank you, I just wanted to get his IP, OS and time when he read teh file, what other suggestions might you have for me ? Thank you
    It is a solution for your life and your job. Don't make things more complex with more contradictions.
    --walkingboots

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: On the network

    It sounds like PHP or ASP would do what you need. But PHP and ASP must be done through a web server that reads PHP or ASP. I would suggest posting in PHP as well. I do not know much ASP. Also JavaScript can detect the OS using "navigator.userAgent.indexOf(*OS ID*)". It reads the OS ID and returns a value. I am not sure what all the OS IDs are.

    This will give you the IP with PHP.
    Code:
    <?php
    $ip = $_SERVER['REMOTE_ADDR'];
    
    echo "<input type='text' name='ip' value='$ip'>";
    ?>
    Last edited by peejavery; August 7th, 2005 at 08:43 AM.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

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