Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** Retourne la distance en mètre entre 2 points selon leurs latitudes et longitudes **/
- function distance($lat1, $lon1, $lat2, $lon2)
- {
- return rad2deg(acos(sin(deg2rad($lat1))*sin(deg2rad($lat2))+cos(deg2rad($lat1))*cos(deg2rad($lat2))*cos(deg2rad($lon1-$lon2))))*111189.577;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement