-4

I have a biig problem with get the city by ip addresse in php, the code work yersteday but now I got an error: Limit Exceed, my code:

 public function getCityAndCountryByIp($ip){
    //get the city
    $tags = get_meta_tags('http://www.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt&IpAddress='.$ip);

    $result = $tags['city'];
    return $result;

Help me please, the code work earlier, Any suggestions please

Menfis Menfis
  • 63
  • 1
  • 3
  • 11

2 Answers2

2

The error Limit exceed should be pretty clear that you used all the free requests for the given period. You should purchase a license for more requests, or use a free service.

mariobgr
  • 2,143
  • 2
  • 16
  • 31
0

Use the php geoip extension it has a free and commercial version http://php.net/manual/en/book.geoip.php

Isaac
  • 983
  • 1
  • 7
  • 13
  • Follow those instructions to install it https://github.com/maxmind/geoip-api-php/blob/master/README.md – Isaac Sep 15 '14 at 08:20