Results 1 to 7 of 7

Thread: REQ: View IP Address.

  1. #1
    Join Date
    Dec 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default REQ: View IP Address.

    I need javascript that shows IP address of person viewing my site or a webpage.

  2. #2
    Join Date
    Dec 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I got one script which displays Ip address on a popup window. Can anyone try to make this thing display within a page.

    <SCRIPT LANGUAGE="JavaScript">

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin
    // http://www.kdcgrohl.com

    // 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>");
    // End -->
    </script>


    <p><center>
    <font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
    </center><p>

    <!-- Script Size: 1.09 KB -->

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Can't be done. The script above uses SSI, which is server-side. The only way to get an IP address is to use some form of server-side scripting.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Dec 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    so how do we do that?

    Well I wanna upload it to geocities, and I use .html web pages.. So even if I get script for server side...will I be able to use it? Reply is appreciated.

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No, you won't. If you want to do this, get a decent host that supports server-side scripts.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Dec 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Geocities?

    If you have a geocities account, you may access the viewers IP simply by going to your site statistics or your geocities account. You can view IPs only if you are recognized as an admin or some mod. Perhaps you should add the guestbook, and you can view IP's through there. Why is it important to view IPs?

  7. #7
    Join Date
    Dec 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well just kinda fun, I like putting javascript[s] on my site.
    Thank's for your kind info..
    cheers

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
  •