Want to hire a development team?
No Images Added Yet

How to calculate distance between two location by PHP Code

Rated2.0/5 (24 ratings)
Add to Favorites
Publisher
If you would like to calculate air distance between two location without any API.
Product Details

If you would like to calculate air distance between two location without any API or mysql query. You can use below code to get distance between two location. $distance_one_latitude = 30.364267; $distance_two_latitude = 30.324860; $distance_one_longitude = 78.087412; $distance_two_longitude = 78.052046; $theta = $distance_one_longitude - $distance_two_longitude; $dist = sin(deg2rad($distance_one_latitude)) * sin(deg2rad($distance_two_latitude)) + cos(deg2rad($distance_one_latitude)) * cos(deg2rad($distance_two_latitude)) * cos(deg2rad($theta)); $dist = acos($dist); $dist = rad2deg($dist); $distance = $dist * 60 * 1.1515; echo $distance = round($distance, 2);

Report this Listing
Price
Free
Licence Type
Free
Views
1,267
Submitted on
17th June 2015
Last Updated
24th June 2015
Licence Type
Freeware
License Price
USD 0
Advertisement The banner below is an advertisement
Quikwit - AI Chatbot Platform

You May Also Like

Cloud Services You May Like

Automating AWS Server Backups and configuring AWS Backup Cycles and AWS Backup rules

Set up automated backups for AWS servers using AWS Backup and clear backup cycles.

Overall cost optimisation by monitoring AWS Cost Explorer

Analyse AWS costs using Cost Explorer and suggest practical ways to reduce monthly bills.

Analysing your AWS bill and suggesting ways to reduce costs

Deep analysis of your AWS bill with a detailed list of cost saving recommendations.

Cloudflare Ongoing Management & Monitoring (Monthly)

Monthly Cloudflare management including policy changes, monitoring, tuning and issue response.

User Reviews

Please rate the listing and tell the world know what do you think about the listing.
(24 ratings)
Average User Rating: 2.0/5
No reviews found.
Not yet reviewed by any member. You can be the first one to write a review for this listing.Click hereto submit your review.