title: Call out the city name using maxmind geoip2
body: <p>I use this simple code to call out the city name using maxmind service (geoip2). It works perfectly and I got this code from someone on this site too, thanks to him.</p>
  
  <p>The problem is when the user's location doesn't belong to any city, then nothing appears, my headline will look stupid like this "abc offer from..."</p>
  
  <p>When this script can't call out the city name, then replace with "your city".</p>
  
  <pre><code>&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="//j.maxmind.com/js/apis/geoip2/v2.0/geoip2.js"&gt;&lt;/script&gt;
  
  &lt;script&gt;
  geoip2.cityISPOrg(function (response) {
  
  $("#city").html(response.city.names.en);
  
  }, null, { w3cGeolocationDisabled: true });
  &lt;/script&gt;
  
  &lt;p&gt;
   &lt;span id="city"&gt;&lt;/span&gt;,
  &lt;/p&gt;
  </code></pre>