Hello,
I am trying to post my city location automatically when someone update their status. How?
I try this but it does not show anything as it suppose to be:
I follow this tutorial: https://www.sitepoint.com/geolocation-jquery-api-geoplugin/
<script>
jQuery(document).ready(function($) {
alert("Your location is: " + geoplugin_countryName() + ", " + geoplugin_region() + ", " + geoplugin_city());
var country = geoplugin_countryName();
$("#country").append("<option value='1' selected>"+country+"");
var zone = geoplugin_region();
$("#zone").append("<option value='1' selected>"+zone+"");
var district = geoplugin_city();
$("#district").append("<option value='1' selected>"+district+"");
});
</script>
<div id="country"></div>
<div id="zone"></div>
<div id="district"></div>
I wonder why it does not show my city. How to show the city by using this script?