post code search - how does it work

R

Rob

Does anyone know where to get or how to integrate a post code search
feature? This will be for a shopping (delivery related) UK website.

I assume that its possible to download the necessary files (mysql database)
to enable a post code search, to determine delivery distances within the UK,
and am wondering where to find this information.

Rob Owen-Wahl
Designfish Studio Ltd
www.DesignfishStudio.com
 
B

brucie

in post: <
Rob said:
Does anyone know where to get or how to integrate a post code
search [...] to determine delivery distances within the UK,

the first place i would check is royalmail, they probably already have a
product to work out postage or a discount "prices-to-areas rates"
database type of thing for merchants. this may also be of help:
http://www.graticule.com/data/uk/pcdata.html
 
A

Andy Dingley

Rob said:
Does anyone know where to get or how to integrate a post code search
feature? This will be for a shopping (delivery related) UK website.

http://www.afd.co.uk

AFD have this pretty much sewn up for the UK market. Decent product,
easy to integrate.
 
T

Toby Inkster

Andy said:
http://www.afd.co.uk

AFD have this pretty much sewn up for the UK market. Decent product,
easy to integrate.

And they seem to be reasonably helpful people there too.

However, if you're a cheapskate you may be able to cobble together
something of use.

Useful sources of data:
http://www.brainstorm.co.uk/post-codes2.txt
http://www.abcounties.co.uk/database/tcpdcsv.txt
http://www.evoxfacilities.co.uk/evoxptn.html

And here's my very own UK postcode validator:

#!/usr/bin/perl
$area = '[A-PR-UWYZ][A-HK-Y]?';
$district = '([0-9]{1,2}|[1-9][A-HJKMNPR-Y])';
$space = '\s+';
$sector = '[0-9]';
$unit = '[ABDEFGHJLNP-UW-Z]{2}';
while ($stringToTest = <>) {
if ( $stringToTest =~ m/^ $area $district $space $sector $unit $/ix ) {
print "is a valid postcode\n";
} else {
print "is junk\n";
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top