Using a postcode search on website

This is a discussion on "Using a postcode search on website" within the Web Page Design section. This forum, and the thread "Using a postcode search on website are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 27th, 2006, 21:46
syb syb is offline
New Member
Join Date: Sep 2006
Location: uk
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Using a postcode search on website

Im looking to make a website that uses a postcode search on the main page to alow users to search for products that are near to there house, i.e. products that are close to user, ne idea how this would work, is there a database or web sevice you can use, think it could be near on possible to code, or am i just being simple .

Cheers in advance for any help.
Reply With Quote

  #2 (permalink)  
Old Sep 27th, 2006, 23:44
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a postcode search on website

You win the prize for the most ambiguous post in September 2006!

I doubt there is an open source database out there for this type of thing. You'd need to set up your own database with all the products in it with a zip code field. Then you'd need a programming language like PHP or ASP to connect to the database and retrieve the info via zip code.

I would suggest finding a freelance directory if what I said sounded impossible or didn't even make sense to you. It'll probably take a lot of work and won't be cheap.
Reply With Quote
  #3 (permalink)  
Old Sep 28th, 2006, 11:26
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Using a postcode search on website

First thing we need to know:

Are these products and their suppliers going to be compiled into a database by you?
Reply With Quote
  #4 (permalink)  
Old Sep 28th, 2006, 11:50
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,619
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Using a postcode search on website

*coughs*, I may have something....

there's open source data out there, you'll just have to spend time looking for it, then some time downloading it, then some more time planing what to do with it, then some more time compiling it into something you can use, the some time coding to the data becomes usefull...

You'll be done in no time ;-)
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #5 (permalink)  
Old Sep 28th, 2006, 12:24
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,739
Blog Entries: 1
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Using a postcode search on website

There are plenty of area code finder apps etc, I don't see why there wouldn't be a zip code one too. I bet you could even get the info from the USPS webs ite or whatever postal service your country uses. There must be a widely available db out there for free use.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #6 (permalink)  
Old Sep 28th, 2006, 12:47
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,619
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Using a postcode search on website

You'd think so, but the British Post Office have very strict rules on the distribution of postcode data. There are plenty of desktop soltuions, but a web solution is a whole different ball-game...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #7 (permalink)  
Old Sep 28th, 2006, 19:24
syb syb is offline
New Member
Join Date: Sep 2006
Location: uk
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a postcode search on website

Cheers for all the advice!

I have tried royal mail website, its not really what i am looking for. I need something like yell.com has when you type in for example tv shop and then you put your postcode in and it lists all the tv shops in order of how far away they are from u.
Reply With Quote
  #8 (permalink)  
Old Sep 28th, 2006, 19:56
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Using a postcode search on website

We already have a system like that in the UK. It's called Yellow Pages.
Reply With Quote
  #9 (permalink)  
Old Sep 28th, 2006, 22:39
Up'n'Coming Member
Join Date: Jun 2006
Location: Florida
Age: 29
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a postcode search on website

Quote:
Originally Posted by ukgeoff View Post
We already have a system like that in the UK. It's called Yellow Pages.

Thanks man, I needed a good laugh...
Reply With Quote
  #10 (permalink)  
Old Sep 28th, 2006, 22:54
Up'n'Coming Member
Join Date: Jun 2006
Location: Florida
Age: 29
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a postcode search on website

Quote:
Originally Posted by syb View Post
for example tv shop and then you put your postcode in and it lists all the tv shops in order of how far away they are from u.
You would have to start with a zip code database that has the longitude and latitude of each zip code. If you have a database of the store address that you want to come back in your results you can use the google maps API to retrieve the stores longitude and latitude position.

Then you can use an algorithm (there are plenty of free php classes that do this) to compute the stores distance from the searchers location.

It is more complicated than this explanation but all good distance based searches are based on longitude and latitude position.

I have built a similar system in the past and to make a good one is a headache.

With that being said, Good Luck...
Reply With Quote
  #11 (permalink)  
Old Sep 29th, 2006, 12:11
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,619
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Using a postcode search on website

Quote:
Originally Posted by jhappeal View Post
You would have to start with a zip code database that has the longitude and latitude of each zip code. If you have a database of the store address that you want to come back in your results you can use the google maps API to retrieve the stores longitude and latitude position.

Then you can use an algorithm (there are plenty of free php classes that do this) to compute the stores distance from the searchers location.

It is more complicated than this explanation but all good distance based searches are based on longitude and latitude position.

I have built a similar system in the past and to make a good one is a headache.

With that being said, Good Luck...
That's one way BUT I have 2 points to make:

1. Search hard enough and you will find a database with every postcode in the UK, including latitude, longitude and x,y coords for calculating straight line distances.

2. Search even harder and you will find a database with every postcode in britain and every neughbouring postcode. IE: it lists all over postcodes nearby.

Hint hint
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #12 (permalink)  
Old Sep 29th, 2006, 13:14
Up'n'Coming Member
Join Date: Jun 2006
Location: Florida
Age: 29
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a postcode search on website

Quote:
Originally Posted by spinal007 View Post
That's one way BUT I have 2 points to make:

2. Search even harder and you will find a database with every postcode in britain and every neughbouring postcode. IE: it lists all over postcodes nearby.
But..

If you base the search on a db that stores a zip code and all zip code within lets say 5, 10, and 50 miles of the zip code you will probably wind up with a slow search.

With out getting to into it when I tried a "relationship" based distance search it ran to slow because of the db select statement. But when I used just the longitude and the latitude load times where under a second for a 100 mile radius. It allowed for a simple select statement because of the specific pattern of longitude and latitude.

Something like:
select from stores where latitude BETWEEN -> 32.57 AND 33.22 && longitude BETWEEN -> 85.57 AND 87.79;

It was the best way that I could find to do it, but then again I am far from a Guru.
Reply With Quote
  #13 (permalink)  
Old Sep 29th, 2006, 13:40
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,619
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Using a postcode search on website

that's ideal... good job....
my point was: there is data out there that allows you to code these solutions. You just have to keep digging!
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #14 (permalink)  
Old Sep 29th, 2006, 13:46
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,739
Blog Entries: 1
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Using a postcode search on website

Now that I think about it, wouldn't some of those apps be able to output their databse as acsv file or similar? In which case you could import it into a MySQL DB very easily and there you have it.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #15 (permalink)  
Old Sep 29th, 2006, 14:15
Up'n'Coming Member
Join Date: Jun 2006
Location: Florida
Age: 29
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a postcode search on website

There are definitely free zip code database's available the problem is updates, most people distributing free versions are distributing an outdated list that they either purchased or found from someone else who purchased and is redistributing the same outdated list. It's a vicious cycle...

I do not know about the UK but in the US the postal service is constantly adding zip codes and changing the geographical map of zip codes. If you are not subscribed to a good service your db will become outdated within a year.
Reply With Quote
  #16 (permalink)  
Old Sep 29th, 2006, 14:27
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,619
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Using a postcode search on website

seriously now, it doesn't change that often and for what we're talking about, it doesn't need to be that accurate and it doesn't have to incur the costs of maintaining the data up-to-date...

Unless they decide to change postcodes to ip addresses, I think we'll be fine...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #17 (permalink)  
Old Sep 29th, 2006, 14:34
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,739
Blog Entries: 1
Thanks: 0
Thanked 17 Times in 17 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Using a postcode search on website

But updating a list is far easier than populating an entire new one.
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #18 (permalink)  
Old Sep 29th, 2006, 15:19
Up'n'Coming Member
Join Date: Jun 2006
Location: Florida
Age: 29
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a postcode search on website

Quote:
Originally Posted by spinal007 View Post
seriously now, it doesn't change that often and for what we're talking about, it doesn't need to be that accurate and it doesn't have to incur the costs of maintaining the data up-to-date...
According to the USPS, there are an average of 25,170 5-digit ZIP Code changes on a monthly basis
http://www.carrierroutes.com/ZIPCodes.html


The database is usually updated the second week of each month
http://www.usps.com/ncsc/ziplookup/zipcodefaqs.htm

If you want an accurate system updates are important, but I guess it is a mater of perspective and budget...
Reply With Quote
  #19 (permalink)  
Old Sep 29th, 2006, 15:26
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,619
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Using a postcode search on website

Ok matey.... I believe you.
But we're talking about UK POSTCODES.
Those don't change very often...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #20 (permalink)  
Old Sep 29th, 2006, 18:26
Up'n'Coming Member
Join Date: Jun 2006
Location: Florida
Age: 29
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Using a postcode search on website

Didn't mean to come off as a know it all, I guess things are just diffrent in Good Ol'London
Reply With Quote
Reply

Tags
postcode script, html, postcode search

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to incorporate a search engine into your website? RobinMarek Search Engine Optimization (SEO) 5 Sep 16th, 2007 11:03
How many pages deep is my website in search results? yeto Starting Out 6 Sep 11th, 2007 21:02
postcode and name search box geoffmuskett PHP Forum 4 Feb 27th, 2007 11:43
I would like to add a search facility on my website - any suggestions? constantinesavva Web Page Design 3 Feb 25th, 2006 23:34


All times are GMT. The time now is 21:05.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16