public static function getIPLocation(){
        //initialize the browser
        $adapter = new GuzzleHttpAdapter();
        
        //create geocoder
        $geocoder = new \Geocoder\Provider\FreeGeoIp($adapter);

        if (!isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
          $client_ip = $_SERVER['REMOTE_ADDR'];
        }
        else {
          $client_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
        }

        return $geocoder->geocode($client_ip);
    }