Jump to content

GeoInfo Module


Recommended Posts

Hi everybody,

First of all: Thanks to everybody for keeping the community alive. Every time I search for something in the forum I find the solution. Great work! I wanted to share a small module with you / my first one. I use it in order to switch the user language on page load.

Processwire GeoInfo

GeoInfo is a small module that Implements Geoplugin PHP web service. Please donate to "geoplugin.com" in order to keep the service alive.

The Module ads two methods to retrieve data from the web service.

$page->GeoInfoIP('IP ADDRESS');

you can enter the ip address manually. If left blank the server remote address will be used. The retrieved data is then stored to the active session, in order to limit the requests. The web service gives back following data.





















for e.g. $page->GeoInfoIP('IP ADDRESS')->geoplugin_countryCode; will give back the country iso code.

$page->GeoInfoLatLong('LAT', 'LONG');

Enter Latitude and Longitude in order to get following information:











for e.g. $page->GeoInfoLatLong('40.712784', '-74.005941'); will give back the city name "New York City".


  • store places in json file / check if place exists
  • implement nearby "service"


  • Like 11
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...