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.
|
|
|
|
|
![]() |
||
Using a postcode search on website
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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. |
|
|
|
|||
|
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? |
|
||||
|
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)
|
|
||||
|
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.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
||||
|
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)
|
|
|||
|
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. |
|
|||
|
Re: Using a postcode search on website
We already have a system like that in the UK. It's called Yellow Pages.
|
|
|||
|
Re: Using a postcode search on website
Quote:
Thanks man, I needed a good laugh... |
|
|||
|
Re: Using a postcode search on website
Quote:
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... |
|
||||
|
Re: Using a postcode search on website
Quote:
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)
|
|
|||
|
Re: Using a postcode search on website
Quote:
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. |
|
||||
|
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)
|
|
||||
|
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.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
|||
|
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. |
|
||||
|
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)
|
|
||||
|
Re: Using a postcode search on website
But updating a list is far easier than populating an entire new one.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
|||
|
Re: Using a postcode search on website
Quote:
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... |
|
||||
|
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)
|
![]() |
| Tags |
| postcode script, html, postcode search |
| Thread Tools | |
|
|
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 |