ip location lookup

Discussion in 'PHP' started by beermaker74, Feb 11, 2007.

  1. #1
    is it possible to have a script at the top of the page that can figure what state a user is in. I want to display information that is customized for that state. I know i can get the ip address. is it possible to do a quick lookup. Also if that is possible how long would it take. I wouldnt want them waiting for all this to work if it takes a long time.
    thanks
     
    beermaker74, Feb 11, 2007 IP
  2. phper

    phper Active Member

    Messages:
    247
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    You need a database that maps IP addresses to geographical location.
    Sample sources that provide such service:
    - http://www.maxmind.com
    - http://www.ip2location.com
    I'm sure there are others out there that you can find with your favourite search engine.

    The processing time is not that bad (depending on how busy your site is), but keep in mind that it can't guarantee 100% accuracy. Also, the database needs to be updated periodically.
     
    phper, Feb 11, 2007 IP