Results 1 to 13 of 13

Thread: Remote host header?

  1. #1
    [fastdetect]
    Guest

    Remote host header?

    I know there is a ip header like this: <!--#echo var="REMOTE_ADDR"-->


    but is there a header which will retreve a HOST NAME?????




    thnxx

  2. #2
    LOL!!!!11ONEEXCLAMATIONT! master7's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA
    Posts
    2,359
    <!--#echo var="REMOTE_HOST"-->
    i'm going to become rich and famous after i invent a device that allows you to stab people in the face over the internet

  3. #3
    [fastdetect]
    Guest
    thnx

  4. #4
    [fastdetect]
    Guest
    does not seems to be wroking........

    here is the link:

    http://df_xfiles.tripod.com/host.shtml

    the source is:

    <SCRIPT LANGUAGE="JavaScript">

    var ht = '<!--#echo var="REMOTE_HOST"-->';

    alert("Your host is "+ht);

    window.defaultStatus = "Your host is "+ht;

    document.write("<title>Your host is "+ht+"</title>");
    </script>




    just a little script to test out the header itmsays my host name is (none) ??????

  5. #5
    Elite Member TonyT's Avatar
    Join Date
    Jan 2000
    Location
    Fairfax, VA
    Posts
    10,337
    prolly only works in netscape
    No one has any right to force data on you
    and command you to believe it or else.
    If it is not true for you, it isn't true.

    LRH

  6. #6
    SG Enthusiast FunK's Avatar
    Join Date
    Aug 2000
    Posts
    2,721
    Tony is partially correct. It can be done on all browesers, but I think SSI is needed for that. Otherwise NS is the only one that it will work corretly on.

    Try this:

    Code:
    <script language="javascript">
     
    var host = '<!--#echo var="REMOTE_HOST"-->'
     
    function hostval() {
    document.myform.host.value=host;
    }
    window.onload=hostval
    </script>
     
    <form method="post" action="" name="myform">
      <input type="text" name="host" readonly>
    </form>
    Simply run adaware, spybot, ZoneAlarm, HijackThis, AVG, update windows daily, have a router, don't open e-mail, turn off action scripting, don't use P2P networks, don't violate EULAs, and wear a condom to get Windows secured.

    People say Linux is alot of work!

  7. #7
    Elite Member TonyT's Avatar
    Join Date
    Jan 2000
    Location
    Fairfax, VA
    Posts
    10,337
    You cannot display or have emailed the IP of an IE browser without the use of a server side app using asp, perl, php scripting or an actual c coded app.
    No one has any right to force data on you
    and command you to believe it or else.
    If it is not true for you, it isn't true.

    LRH

  8. #8
    Elite Member TonyT's Avatar
    Join Date
    Jan 2000
    Location
    Fairfax, VA
    Posts
    10,337
    This is how SG does it on the TCP Optimizer Page. As you can see, the actual script is in cgi-bin:


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <html><head>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function loadurl(url) {
    if (document.images)
    window.location.replace(url);
    else
    window.location.href = url;}
    //-->
    </script>
    <title>Connection Diagnostics</title></head><body bgcolor="white">
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    window.loadurl('http://forums.speedguide.net/cgi-bin/optd/optd.cgi?DATA_OFFSET=40&TCP_Options_string=020405b40103030201010402&IP_MTU_DISCOVER=1&WIN=64240&RWIN =256960&MSS=1460&SCALE=2&TTL=54&TSOPT=0&SACK_PERM=1&IP_TOS=0&IP=XX.XX.XX.XX&timestamp=1019516484');

    //--> </SCRIPT><h1>Connection parameters retrieved</h1></body> </html>
    No one has any right to force data on you
    and command you to believe it or else.
    If it is not true for you, it isn't true.

    LRH

  9. #9
    SG Enthusiast FunK's Avatar
    Join Date
    Aug 2000
    Posts
    2,721
    This code above is built as host.shtml on my site.
    I'm sure that it can be done in pure javascript under NS. It is not supported across all browsers that way.

    The code above works just fine though.

    As Seen Here

    Everything that I have found on the net suggests that JS is not the best for doing this and that a server side scripting language is the best bet, but it can be done without ASP, PHP, or CGI.

    I am also confident that the IP / Host can be e-mailed after it is turned into a variable.
    Simply run adaware, spybot, ZoneAlarm, HijackThis, AVG, update windows daily, have a router, don't open e-mail, turn off action scripting, don't use P2P networks, don't violate EULAs, and wear a condom to get Windows secured.

    People say Linux is alot of work!

  10. #10
    Elite Member TonyT's Avatar
    Join Date
    Jan 2000
    Location
    Fairfax, VA
    Posts
    10,337
    That code will not work with all webhosts though. It is still dependant upon the apps installed on the server. The server must support SSI. Many do not.

    This works in Netscape w/ Java enabled:

    <SCRIPT LANGUAGE="JavaScript">

    if ((navigator.appVersion.indexOf("4.") != -1) && (navigator.appName.indexOf("Netscape") != -1)){
    ip = "" + java.net.InetAddress.getLocalHost().getHostAddress();
    document.write("Your IP address is " + ip);
    }
    else {
    document.write("IP Address only shown in Netscape with Java enabled!");
    }

    </script>


    This will work in IE and Netscape with SSI supported server:

    <SCRIPT LANGUAGE="JavaScript">

    // Depending on your server set-up,
    // you may need to use the ".shtml"
    // extension [instead of the "html"
    // or "htm"] as the script uses Server
    // Side Includes. To display in the
    // title bar, exclude the
    //"<title></title>" code from the page.

    // This part gets the IP
    var ip = '<!--#echo var="REMOTE_ADDR"-->';

    // This part is for an alert box
    alert("Your IP address is "+ip);

    // This part is for the status bar
    window.defaultStatus = "Your IP address is "+ip;

    // This part is for the title bar
    document.write("<title>Your IP address is "+ip+"</title>");

    </script>
    No one has any right to force data on you
    and command you to believe it or else.
    If it is not true for you, it isn't true.

    LRH

  11. #11
    SG Enthusiast FunK's Avatar
    Join Date
    Aug 2000
    Posts
    2,721
    Tony, you and I are talking apples and apples. I'm granny smith and you're golden delicious (don't read into that!)

    We both had the right idea. JS is neutered and there is some need for an app that can handle what he is trying to do.

    Bottom line is that SSI is probably needed as a minimum. I mean even sites that don't suppot perl support SSI. Then again there are some that support jack squat. Basically, I wanted him to try the code I found and see if it worked. If so, no damage done.

    Anyway, I hope that he gets what he needs from what we posted. I know I learned from it and that's all that matters.

    Thanks for the info BTW. Good Stuff as usual
    Simply run adaware, spybot, ZoneAlarm, HijackThis, AVG, update windows daily, have a router, don't open e-mail, turn off action scripting, don't use P2P networks, don't violate EULAs, and wear a condom to get Windows secured.

    People say Linux is alot of work!

  12. #12
    Elite Member TonyT's Avatar
    Join Date
    Jan 2000
    Location
    Fairfax, VA
    Posts
    10,337
    Here's an apple pie!

    Most webhosts have php installed!

    <?php
    $ip = $REMOTE_ADDR;
    print "ip = $ip";
    ?>
    No one has any right to force data on you
    and command you to believe it or else.
    If it is not true for you, it isn't true.

    LRH

  13. #13
    SG Enthusiast FunK's Avatar
    Join Date
    Aug 2000
    Posts
    2,721
    HA! Good one!

    But, I doubt that he does as he's on tripod.

    Tripod Plus - Only $4.95 a Month!
    Looking for the freedom to build your site without banner ads or other restrictions? Plus is your plan!

    NO ADS!
    25 MB of Disk Space
    More Bandwidth
    File Sharing
    Web Folders
    JavaScript & CGI Library
    Easy to Use Building Tools
    Page Design Templates
    FREE Images
    FrontPage Enabled
    That's the advanced plan.

    I guess the CGI solution you posted earlier would have been best.

    P.S. This is the most action this forum has had all week.
    Simply run adaware, spybot, ZoneAlarm, HijackThis, AVG, update windows daily, have a router, don't open e-mail, turn off action scripting, don't use P2P networks, don't violate EULAs, and wear a condom to get Windows secured.

    People say Linux is alot of work!

Bookmarks

Posting Permissions

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