We have an accuracy rate of around 95%. The same service is in use for BBC News, providing location information for user comments within the “Have your say” section of the site; it has strong pedigree.

As a side note, I’ve just updated the extension to version 3.1, which should fix the encoding issue reported by michael-e and the directory naming issue reported by dallasbpeters. It also removes the frequency cap, meaning that you can use it as much as you like.


Geo Location Service updated to version 3.1 on 29th of July 2010

Uh, was the lib folder deleted by accident?

Wow, that’s weird. Will check.

Strangely this had fallen out of version control. I’ve added it back in!

Hahah, all good, thanks for the extension :)

Thanks for the info, Joseph. Still, a great extension!

If I only need the country of the visitor, would this extension be best over the more simple ip to location?

besides more comprehensive location data, how do they differ underneath?


I whipped together the ip to location in about 10 minutes because I needed it and didn’t realize Geo Location existed. All ip-to-location is is a dynamic datasource with the $_SERVER remote address (the client IP) hard-coded into the URL, which points to the API. It is simple and seems to work, but is of course dependent on

i get this error:

Parse error: syntax error, unexpected TENCAPSEDANDWHITESPACE, expecting TSTRING or TVARIABLE or TNUMSTRING in /extensions/geolocationservice/lib/class.geolocation_service.php on line 23

Should result in a 404 Not Found? Extension isn’t working for me at the moment…

Should result in a 404 Not Found? Extension isn’t working for me at the moment…

Nope, this is my bad. A DNS update that shouldn’t have happened.

Now fixed.

Thanks Joseph!

is it possible to define the country and the city as parameters? i am trying to access googles weather api by the dynamic xml datasource…

Hi Julian,

These two are specified as return parameters. See the read me for a paraeter key breakdown:

Thanks! But the URL{$City} does not work. When debuging the page, $City is only availible as xml datasource and not as a global parameter.

Bildschirmfoto 2010-11-08 um 16.30.19.png

Nobody an idea how to connect the geo location to googles weather api?

@julian, In the datasource that is producing $city, you should be able to specify the field containing the $city value as a parameter output (in the lower left corner of the datasource editor). That should make it available to your Geo Location DS.

@ashooner, thank you but it’s not possible to set parameter output with dynamic xml as source. other ideas?

Is this service still working? I'm getting an empty response:

    <country />
    <region />
    <city />
    <lat />
    <lon />
    <error />

Thank you.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details