Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Feb 2010
    Posts
    209
    Thanks
    15
    Thanked 2 Times in 2 Posts

    What IP can tell me?

    Hi,

    I know ones' IP, and I want to know where "it" is - city and address...

    Is it possible? OR Can I create a script to do locating? {It would detect all info when he is on the page with script}

    All, suggestions are welcome...

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Geo locating *may* be able to get the country, region and sometimes city. There exists no implied accuracy, except in domain lookups with provided addressing (so, businesses maybe). That would be exclusive of NAT.
    My last test put my expected location (non-proxied, with an accurate ip) over 3400KM away and in a different country. So to answer your question, an ip can provide nothing of tangable value. We log so if any illegal activity occurs the address can be provided to authority and they can work with the isp - an ISP will not provide end users with information. Static addresses can be used for blocking, but thats about the extent of its value on the web.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #3
    Regular Coder
    Join Date
    Feb 2010
    Posts
    209
    Thanks
    15
    Thanked 2 Times in 2 Posts
    Could you post a script which you used?

    I know that is is really not accurate detection, but maybe it will show a real place. If it will show many KM from me, I will understand it as a fail info

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,300
    Thanks
    203
    Thanked 2,561 Times in 2,539 Posts
    Firefox Plugin:
    Displays IP Trace information when you hover over a link.
    Hostipfox 0.4.3.9 (download)
    Source: git://github.com/bfolkens/hostipfox-firefox-plugin.git

    It is your responsibility to die() if necessary….. - PHP Manual

  • #5
    Regular Coder
    Join Date
    Feb 2010
    Posts
    209
    Thanks
    15
    Thanked 2 Times in 2 Posts
    I need script which could show not mine but others information...

  • #6
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    PHP has a geoip module through pecl.
    http://php.net/manual/en/book.geoip.php
    Getting the hostname is generally just gethostbyaddr. BTW, that one can also fail.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


  •  

    Posting Permissions

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