src/Buonzz/GeoIP/GeoIP.php
function resolve($ip){
      
      $url = \Config::get('laravel-4-freegeoip::freegeoipURL').$ip;
      
      $ch = curl_init();
      curl_setopt ($ch, CURLOPT_URL, $url);
      curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, \Config::get('laravel-4-freegeoip::timeout'));
      
      $file_contents = curl_exec($ch);    
      curl_close($ch);
      
      $data = json_decode($file_contents);
      
      if($data == NULL)
          throw new \Exception("Problems in retrieving data from http://freegeoip.net");

      return $data;
    }
function resolve($ip){
      
      $url = \Config::get('laravel-4-freegeoip::freegeoipURL').$ip;
      
      $ch = curl_init();
      curl_setopt ($ch, CURLOPT_URL, $url);
      curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, \Config::get('laravel-4-freegeoip::timeout'));
      
      $file_contents = curl_exec($ch);    
      curl_close($ch);
      
      $data = json_decode($file_contents);
      
      if($data == NULL)
          throw new \Exception("Problems in retrieving data from http://freegeoip.net");

      return $data;
    }
function resolve ( $ ip ) { $ url = \ Config :: get ( 'laravel-4-freegeoip::freegeoipURL' ) . $ ip ; $ ch = curl_init ( ) ; curl_setopt ( $ ch , CURLOPT_URL , $ url ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , 1 ) ; curl_setopt ( $ ch , CURLOPT_CONNECTTIMEOUT , \ Config :: get ( 'laravel-4-freegeoip::timeout' ) ) ; $ file_contents = curl_exec ( $ ch ) ; curl_close ( $ ch ) ; $ data = json_decode ( $ file_contents ) ; if ( $ data == NULL ) throw new \ Exception ( "Problems in retrieving data from http://freegeoip.net" ) ; return $ data ; }
call the freegeoip.net for data, retrieve it as JSON and convert it to stdclass.

@todo make this thing use Guzzle instead, you novice kid!

@return void
call the freegeoip . net for data retrieve it as JSON and convert it to stdclass .