Forum Moderators: coopster

Message Too Old, No Replies

zip code lookup/distances

seeking php/mysql solutions

         

nquinn

3:40 pm on Feb 11, 2004 (gmt 0)

10+ Year Member



Hi all,

I am looking to create a system where users
can find other users within a certain radius of their zip code.

Does anyone know of a good script/etc that could help me with this? So far the best I've found is PHPZipLocator, but i'm not entirely sure how to use it.

IF someone could walk me through this, it would very much be appreciated.

Thanks,

Neil

moltar

4:16 pm on Feb 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This thread [webmasterworld.com] could help you.

nquinn

7:13 pm on Feb 11, 2004 (gmt 0)

10+ Year Member



Well,

I've managed to get everything up and running, but
it seems the zip code file i'm using is outdated/just plain not accurate.

I found this:
ht*p://www.census.gov/ftp/pub/tiger/tms/gazetteer/zcta5.zip

but, the data is in a crazy columnar format and not that easy to access. if anyone here is really good at parsing, i'd really appreciate a way to turn this file into one that just has

zip ¦ longitude ¦ latitude

(long and lat are the last 2 columns in the table... the zipcode is the first column minus the first 2 letters(the state) )

-Neil

Timotheos

7:37 pm on Feb 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Import it into Excel, delete columns and export as CSV

nquinn

8:35 pm on Feb 11, 2004 (gmt 0)

10+ Year Member



Can't import it into excel-

When you do, all of the data is placed into
one column, just spaced apart- sort of like this:

A.................¦ b ¦ c ¦ d ¦ e ¦
--------------------------------------
col1 col2 col3....¦ ¦ ¦ ¦ ¦
col1 col2 col3....¦ ¦ ¦ ¦ ¦

see the file i linked to to understand better!

-Neil

figment88

9:04 pm on Feb 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Excel has a convert to columns function that lets you specify the seperator.

Timotheos

9:40 pm on Feb 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When the text import wizard pops up use "fixed width" instead of "delimited". Works for me ;-) BTW, thanks for the link on the zip code file.