How to check if a certain coordinates fall to another coordinates radius using PHP only

后端 未结 4 1233
悲&欢浪女
悲&欢浪女 2020-12-07 15:51

I have seen so many functions but it happens to work only for MySQL or Postgresql. I want the equivalent logic for PHP. I\'m doing some comparisons, like I have this data th

4条回答
  •  我在风中等你
    2020-12-07 16:32

    You should use Haversine formula to compute distance between two points. You have a PHP version here.

    Then just check if distance < 100000.

提交回复
热议问题