1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

UK latitude longitude radius calculation

Discussion in 'PHP' started by stephan2307, May 6, 2010.

  1. #1
    Hi,

    I have a database with UK postcodes and their latitude and longitude data.

    What I want to do is have a search on my website and where a user can enter a postcode and select a radius like 5 miles. Then I want the search to only bring up companies from my database that are within this 5 miles radius.

    Anyone got any idea how to calculate that?
     
    stephan2307, May 6, 2010 IP
  2. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
  3. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    #3
    Thank you. Exactly what I needed.
     
    stephan2307, May 7, 2010 IP