SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: IP addresses

  1. #1
    SitePoint Addict
    Join Date
    Aug 2004
    Location
    philmont
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IP addresses

    I know I've seen some codes that were done in javascript (I believe). What I am looking for is a script (or website) similar to one that locates where someone received their social security number from::

    ie, the user would put in a social security number and then it would show where the person got the number.

    what I'm looking for is something for the IP addresses. I have been able to grab the IP addresses from visitors to my website and I would like to locate where my visitors come from.

    any suggestions?

  2. #2
    SitePoint Aficionado JVLB's Avatar
    Join Date
    Jan 2002
    Location
    N 44 56.537' W 123 3.683'
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to make sure that it's clear, IP addresses don't have anything to do with physical regions, per se, as SSN's do.

    The IP address of the visitor is exposed to the server so server-side scripts can discern it, but JavaScript executes on the client's computer and never even sees the IP.

  3. #3
    SitePoint Member
    Join Date
    Jan 2005
    Location
    Nebraska
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you mean you want the code to automatically read the output of your IP logging program, or do you want to be able to type the IP address into a text box and have it tell you where they came from?

    The second part is really easy.

    Code:
    <html>
    <head>
    <title>IP Lookup</title>
    <script language="javascript1.2">
     
    function lookupIP(){
         var address=document.IPlookup.ipAdd.value;
         location.href="http://www.samspade.org/t/ipwhois?a="+address;
         return false;
    }
    
    </script>
    </head>
    <body>
    
    <form name="IPlookup" onSubmit="return lookupIP();">
    <input type="text" name="ipAdd"><input type="submit" value="Lookup">
    </form>
    </body>
    </html>
    This is very simple code and contains no validation mechanisms to test to see if a valid IP address was entered. It simply does a whois lookup on the IP address entered in the text box.

    Louie

  4. #4
    SitePoint Addict
    Join Date
    Aug 2004
    Location
    philmont
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the code given is someplace along the lines of what I am looking for. Although it seems that almost every IP that I place into the form shows me that everyone originates from various addresses in Va.
    Is there someway I can locate generally the addresses that would show me what city/state they are using their comp from?

    I know all of my users, so far, are from the North Eastern part of the US, so the whole VA. thing isn't exactly what I'm looking for- it seems all the pages that I have checked do the same thing.


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
  •