SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Always learning viveknarula's Avatar
    Join Date
    Mar 2006
    Location
    INDIA
    Posts
    418
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Ip -> Country name

    hello friends,

    i am storing IP addresses of visitors of my site. i want to see the Countries with the help of IPs. I had heard sometime back that there is an API for it but i don't remember now. may be something like Whois API.

    Can any one tell me with the help of which resource i can achieve my objective ?

    Thanks

  2. #2
    SitePoint Guru
    Join Date
    Dec 2005
    Posts
    982
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found a free MySQL database file that had IP ranges and their associated country. I wouldn't trust it 100% for accuracy, but it seems to do very well for us.

    I think there may also be some third party sites out there that you can ping with an IP and they will tell you the country, but I don't like waiting for their server to respond.
    MySQL v5.1.58
    PHP v5.3.6

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2007
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,603
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Just remember that any IP lookup will give you the location of the ISP or proxy server, the actual location of your visitor need not be anywhere near that location.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •