That I can get the street name from a post code in PHP? For example, someone enters their post code and it comes up with the street name rather than them having to type the whole thing out?

Please help

Recommended Answers

Lost some details of the post, damn edits
In UK Canada Yes
In US Au no

for the uk get the database to import to a sql table or red from perl
here
http://88.80.16.63/leak/uk-post-codes-2009.bz2
or buy it from the post office

Jump to Post

All 3 Replies

Lost some details of the post, damn edits
In UK Canada Yes
In US Au no

for the uk get the database to import to a sql table or red from perl
here
http://88.80.16.63/leak/uk-post-codes-2009.bz2
or buy it from the post office

Is it safe though? :o

the rar file contains text only, but yes it would be silly to take my word for it,
google.co.uk/search?q=leaked+UK+postal+database
if you prefer to follow the links
it is a large 230MB text file, that takes some time to open in even a fast editor

details lost in prior post, went something like

In US Au and others post codes relate to areas not streets so you cant get a street name from the postcode
in UK Can and others post code refers to a street, or to part of a long street, so the postcode can provide other details
the publicly available(free) database is limited in scope, and the lookup tool is robot resistant
the database is altered at regular intervals with creation and amendment and deletion of postal codes, so the lookup detail is onlly as good as the date of the database

first few lines of the text file are

PZ_Postcode,PZ_IntroductionDate,PZ_GridRefEast,
PZ_GridRefNorth,PZ_County,PZ_District,PZ_Ward,
PZ_UserType,PZ_GridStatus,PZ_Country,PZ_WardStatus,
PZ_NHS_Code,PZ_NHS_Region,PZ_Long,PZ_Lat,PZ_OSRef,
PZ_Update
"AB101AA","20070339","39420","80630","00","QA","MH","1","1","179","1","SN9","S00",-2.097472,57.147616,"NJ9420006300","08/07/09 00:00:00"
"AB101AF","19951239","39410","80640","00","QA","MH","1","1","179","1","SN9","S00",-2.099127,57.148513,"NJ9410006400","08/07/09 00:00:00"
"AB101AG","19951239","39420","80630","00","QA","MH","1","1","179","1","SN9","S00",-2.097472,57.147616,"NJ9420006300","08/07/09 00:00:00"
"AB101AH","19951239","39430","80630","00","QA","MH","1","1","179","1","SN9","S00",-2.095819,57.147617,"NJ9430006300","08/07/09 00:00:00"
"AB101AJ","19980739","39410","80630","00","QA","MH","0","1","179","1","SN9","S00",-2.099125,57.147615,"NJ9410006300","08/07/09 00:00:00"

not so much street names, but great for google mapping

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.