0

One of my friend wants to have a website which calculates the distance between ads poster location and a visitor. For example when I would visit this website it would display ads which are near to my location It would also display "30 km away from you".

Where I should start from? Is there any idea? Or any script which I can use for this method?

I have seen google map api but I dont get idea how to display my database records as per distance.

Please guide me.

Thank You

danny
  • 465
  • 3
  • 8
  • 18

1 Answers1

0

Use the haversine formula in MySQL and download an open source zipcode database. Import it, and work the query to your desired result. Hope that helps.

Haversine Reference

Zip Code Database Project

Community
  • 1
  • 1
wesside
  • 5,622
  • 5
  • 30
  • 35