You are here: Telem>System Web>GeoPlugin (21 Mar 2009, UnknownUser)EditAttach


Geo location services

Geo Plugin provides geo-location services, implementing a lookup feature from IP address, domain name, or physical address. It is a wrapper around the CPAN:Geo::IP and CPAN:Geo::GeoNames libraries.

Note that Geo Plugin caches each request, so multiple instances on the same page do not slow things down.


%GEO{ "address" format="$country_code ($lat,$lng)" }%

address can be one of:
  • IP address
  • Domain name
  • Physical address

the format string can reference these defined variables
  • $country
  • $country_name
  • $latitude
  • $longitude
  • $time_zone
  • $region (state or province, typically)
  • $city
  • $postal_code (for USA addresses only (maybe Canadian, too))
  • $area_code
  • $metro_code (for USA addresses only)

  • $query the original query
  • $method Geo::IP or Geo::GeoNames


Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See for more help.

To install the database(s) used by CPAN:Geo::IP,

CPAN:Geo::GeoNames uses a webservice (I believe). I think there is a way to download a database, but I have not persued that yet.


Author(s): Foswiki:Main.WillNorris
Copyright: © 2009 Will Norris.
License: GPL (Gnu General Public License)
Version: 3230 (2009-03-21)
Change History:  
17 Mar 2009 Added time_zone support
17 Mar 2009 Initial release
Geo::IPOptional. Required to lookup location based on IP address
Geo::GeoNamesOptional. Required to lookup location based on geographic name
Home page:

Topic revision: r1 - 21 Mar 2009, UnknownUser
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Telem? Send feedback