close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Find whats in a radius of a postcode

Thread began 6/10/2009 3:40 pm by Carl | Last modified 6/11/2009 11:25 am by Ray Borduin | 4700 views | 2 replies |

Carl

Find whats in a radius of a postcode

Hi All,

Does anyone know a way to find what is in a radius of a postcode using PHP. A great example of what I want is on property websites where it says enter a location and how many miles from that location do you want to live 1, 2 or 3 miles. Then the PHP coding picks all the properties that are in the location I selected and then all the properties within the radius of 1, 2 or 3 miles of the location. I can get hold of all the postcodes with relating area names and longitude and latitude.

Thanks

Carl

Sign in to reply to this post

Justin Nemeth

Its hard to say how to do this specifically, but here is a high level. When they pick the initial location, you'll need to get the latitude and longitude. Then you need to see how much 1 mile corresponds to in latitude longitude. Using that measurement, you can get a range of acceptable latitude longitude values for your mile radius. Using this range, you would have to devise a database query that finds all results with a location falling inside your 1 mile range. I think something like that would do that trick.

Sign in to reply to this post

Ray BorduinWebAssist

There are lots of people that offer canned solutions for this as well:

zip-code-locators/

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...