PHP Zip Code / State Locator

Discussion in 'PHP' started by tdd1984, Mar 13, 2009.

  1. #1
    Does any one know of any php functions or something that is very accurate that can locate a users zip code. For example say I visit a website and I'm located in Indiana. This website would show the appropriate listing for the state of Indiana?

    I know of php geoip, but didn't know if that is the way to go. Possibly someone in here is pretty famaliar with what I'm trying to do?
     
    tdd1984, Mar 13, 2009 IP
  2. crivion

    crivion Notable Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    210
    Digital Goods:
    3
    #2
    with geoip you can locate cities/states too and with a mysql query or something you can get what you need
     
    crivion, Mar 13, 2009 IP
  3. tdd1984

    tdd1984 Well-Known Member

    Messages:
    2,357
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    150
    #3
    sweet, so with geoip I can return the zip code from the other user computer?

    How accurate would you say it is?
     
    tdd1984, Mar 13, 2009 IP
  4. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Not at all. Zip codes are very specific; geo-IP databases are vague and notoriously inaccurate. The best way to find out someone's zip code is to ask them. Offer them something free by mail and they'll be honest. Tried and true.
     
    SmallPotatoes, Mar 13, 2009 IP