public static function lookup($ip = NULL)
 {
     require_once EXTENSIONS . '/geolocation_service/lib/class.geolocation_service.php';
     if (is_null($ip)) {
         $ip = $_SERVER['REMOTE_ADDR'];
     }
     return _geoloc::lookup($ip);
 }
 public function grab(&$param_pool)
 {
     $result = new XMLElement($this->dsParamROOTELEMENT);
     $ip = $_SERVER['REMOTE_ADDR'];
     $location = _geoloc::lookup($ip);
     if (is_null($location)) {
         $result->appendChild(new XMLElement('error', 'Unknown location'));
     } else {
         $result = $location;
     }
     return $result;
 }