The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Locate places within X miles

I am creating an accommodation listing site and need to be able to enter a location (either UK postcode or town or city) and for the site to return me a list of all places that are within X miles of this location.

Anyone any idea how such a system would be created? Please note I need this for the UK only.

Hi!
If you can get geospatial data about all objects, then you can use, for example, MySQLs spatial extensions to calculate distance between two points and return only those results that are within specified range. I have not used them myself, but suspect that it would not be too difficult (if you can get geospatial data that is).
Other solution is to make a mashup with existing map engine (Google maps, yahoo maps etc).