I am after a very simple distance between two 2D points function for PHP.
For example lat, lng of -50000.00,400.00. This is a flat surface, no need calculate for the earth circumference.
I have tried all sorts of solutions for this and none of them work correctly. I do not know why but when lat or lng is > ~240.00 the result starts going backwards as if the distance is too great to calculate. Even the online calculators fail to calculate a large distance.
Any help would be greatly appreciated.