original_string: public function getLocationUsingProvider()
      {
          $providerId = Common::getRequestVar('id');
          $provider = LocationProvider::getProviderById($providerId);
          if (empty($provider)) {
              throw new Exception("Invalid provider ID: '$providerId'.");
          }
  
          $location = $provider->getLocation(array('ip'                => IP::getIpFromHeader(),
                                                   'lang'              => Common::getBrowserLanguage(),
                                                   'disable_fallbacks' => true));
          $location = LocationProvider::prettyFormatLocation(
              $location, $newline = '<br/>', $includeExtra = true);
  
          return $location;
      }
code: public function getLocationUsingProvider()
      {
          $providerId = Common::getRequestVar('id');
          $provider = LocationProvider::getProviderById($providerId);
          if (empty($provider)) {
              throw new Exception("Invalid provider ID: '$providerId'.");
          }
  
          $location = $provider->getLocation(array('ip'                => IP::getIpFromHeader(),
                                                   'lang'              => Common::getBrowserLanguage(),
                                                   'disable_fallbacks' => true));
          $location = LocationProvider::prettyFormatLocation(
              $location, $newline = '<br/>', $includeExtra = true);
  
          return $location;
      }
code_tokens: public function getLocationUsingProvider ( ) { $ providerId = Common :: getRequestVar ( 'id' ) ; $ provider = LocationProvider :: getProviderById ( $ providerId ) ; if ( empty ( $ provider ) ) { throw new Exception ( "Invalid provider ID: '$providerId'." ) ; } $ location = $ provider -> getLocation ( array ( 'ip' => IP :: getIpFromHeader ( ) , 'lang' => Common :: getBrowserLanguage ( ) , 'disable_fallbacks' => true ) ) ; $ location = LocationProvider :: prettyFormatLocation ( $ location , $ newline = '<br/>' , $ includeExtra = true ) ; return $ location ; }
docstring: Echo's a pretty formatted location using a specific LocationProvider.
  
  Input:
  The 'id' query parameter must be set to the ID of the LocationProvider to use.
  
  Output:
  The pretty formatted location that was obtained. Will be HTML.
docstring_tokens: Echo s a pretty formatted location using a specific LocationProvider .