title: Using IP of visitors with API for displaying Flags of them
body: <p>I wrote below PHP Code for getting IP of visitors and using API for showing the visitors country flags. This code worked on my hosting but suddenly after 2 month I saw it doesn't show the flags of visitors! I really don't know what happened! If someone knows please guide me, Thanks a lot </p>
  
  <pre><code>   &lt;?php
      $ip=$_SERVER['REMOTE_ADDR'];
      $json_data = file_get_contents("http://ip-api.com/json/$ip");
      $ip_data = json_decode($json_data, TRUE);
      if ($ip_data['status'] == 'success') {
          ?&gt;
  
  
  
      &lt;?php }
      ?&gt;
  
      &lt;?php
      $country= $ip_data['countryCode'];
      echo "&lt;img src='http://b-c-e.us/country/images/$country.png' height='13' width='20'/&gt;";
  
      ?&gt;
  </code></pre>