So I have a pretty simple bit of JS using the navigator.geolocation.getCurrentPosition jammy. $(document).ready(function(){ $("#business-locate, #people-locate").click(function() { navigator.geolocation.getCurrentPosition(foundLocation, noLocation); }); navigator.geolocation.getCurrentPosition(foundLocation, noLocation); function foundLocation(position) { var lat = position.coords.latitude;...
  • May 23, 2022
  • 0 Comments
I want to get visitors country via their IP… Right now I’m using this (http://api.hostip.info/country.php?ip=…… ) Here is my code: <?php if (isset($_SERVER['HTTP_CLIENT_IP'])) { $real_ip_adress = $_SERVER['HTTP_CLIENT_IP']; } if...
  • May 21, 2022
  • 0 Comments
How do I calculate distance between two GPS coordinates (using latitude and longitude)? 31 Answers 31 Calculate the distance between two coordinates by latitude and longitude, including a Javascript...
  • May 7, 2022
  • 0 Comments