SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    canada
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Searching by zip/postal code

    I have a client who wants to be able to search by zip/postal code, and find businesses closest to the searchers postal code... how is this done? Do you need a large database of postal codes? or is it some sort of service needed to be subscribed to...

  2. #2
    SitePoint Addict
    Join Date
    Nov 2004
    Location
    Ukraine
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hm...
    teoretically it can be done if you will have database of the zip locations with geographical location info. In other case use special services. (I have seen them - not sure where)
    If I will find something I will post here.

  3. #3
    $this->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Dec 2003
    Location
    Federal Way, Washington (USA)
    Posts
    1,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can build your own database of postal codes and locations, or there are products you can buy with this information. I'm assuming you want Canadian postal code data, which I know nothing about, but I can tell you that the US Postal Service has postal code database information you can buy. Whether or not you'd want to do that vs. building your own database would likely depend on how often that information changes and how critical it would be for your database to be up to the minute accurate.

    Hope this helps.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    Showcase your music collection on the Web

  4. #4
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jgoddard
    I have a client who wants to be able to search by zip/postal code, and find businesses closest to the searchers postal code... how is this done? Do you need a large database of postal codes? or is it some sort of service needed to be subscribed to...
    You may want to take a look at these two classes that offer solutions to search in zip code database for the nearest locations as you need:

    php Zip Locator

    Zip Codes Range
    Manuel Lemos

    Metastorage - Data object relational mapping layer generator
    PHP Classes - Free ready to use OOP components in PHP

  5. #5
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    canada
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks,
    that gives me something to start with for the client.

  6. #6
    SitePoint Addict
    Join Date
    Nov 2004
    Location
    Ukraine
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow.
    they are cool. mlemos, thanks

    Also at the readme there are link to the complete database, so I think iit will suite anybody


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •