post code search - how does it work

Discussion in 'HTML' started by Rob, Jul 12, 2004.

  1. Rob

    Rob Guest

    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
    Rob, Jul 12, 2004
    #1
    1. Advertising

  2. Rob

    brucie Guest

    in post: <news:ccti7t$sh0$>
    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

    --
    b r u c i e
    brucie, Jul 12, 2004
    #2
    1. Advertising

  3. Rob

    Andy Dingley Guest

    "Rob" <> wrote in message news:<ccti7t$sh0$>...
    > 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.
    Andy Dingley, Jul 12, 2004
    #3
  4. Rob

    Toby Inkster Guest

    Andy Dingley wrote:

    > "Rob" <> wrote in message news:<ccti7t$sh0$>...
    >> 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.


    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";
    }
    }


    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby Inkster, Jul 12, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nick L
    Replies:
    10
    Views:
    591
    Jerry Coffin
    Aug 31, 2004
  2. jblazi
    Replies:
    5
    Views:
    429
    jblazi
    Aug 16, 2004
  3. Tarun
    Replies:
    5
    Views:
    390
    Tarun
    Jul 14, 2005
  4. =?Utf-8?B?Z29yaWxsYQ==?=
    Replies:
    1
    Views:
    767
    Masudur
    May 25, 2007
  5. Abby Lee
    Replies:
    5
    Views:
    400
    Abby Lee
    Aug 2, 2004
Loading...

Share This Page