Forum Moderators: phranque
This is basic maths, as long as you have the lat/long co-ordinates for each landmark.
See here:-
[jan.ucc.nau.edu...]
and then here:-
[mathforum.com...]
I'm sure the guys in the php forum could then guide you further as to the actual code, but it should be quite simple.
If you want to hunt around for some code snippets, try the ham radio communities. I'm sure I've seen scripts (php/Java) written by radio hams for determining distance between two radio stations. In those circles, Lat/Long is commonly converted to "Maidenhead Locator Squares" - again an easy conversion in maths to and from Lat/Long.
That may give you some new search terms to try. I'll sticky you the one I found, which very nearly does exactly what you want.
TJ