title: Fatal error: Uncaught Error: Call to undefined function ip_info()
body: <pre><code>&lt;?php
  
  echo ip_info(&quot;Visitor&quot;, &quot;Country&quot;); // India
  echo ip_info(&quot;Visitor&quot;, &quot;Country Code&quot;); // IN
  echo ip_info(&quot;Visitor&quot;, &quot;State&quot;); // Andhra Pradesh
  echo ip_info(&quot;Visitor&quot;, &quot;City&quot;); // Proddatur
  echo ip_info(&quot;Visitor&quot;, &quot;Address&quot;); // Proddatur, Andhra Pradesh, India
  
  print_r(ip_info(&quot;Visitor&quot;, &quot;Location&quot;)); // Array ( [city] =&gt; Proddatur [state] =&gt; Andhra Pradesh [country] =&gt; India [country_code] =&gt; IN [continent] =&gt; Asia [continent_code] =&gt; AS )
  
  ?&gt;
  </code></pre>
  <p>Source: <a href="https://stackoverflow.com/questions/12553160/getting-visitors-country-from-their-ip">Getting visitors country from their IP</a></p>