FreeGeoIP extension for Symphony CMS

Version: 0.3.1
Date Released: 19 May 2014

If you have suggestions for features, improvements or spot any bugs, leave a comment at the bottom of the page or alternatively log an issue on GitHub.

What is FreeGeoIP for Symphony CMS?

FreeGeoIP for Symphony CMS returns a users geolocation information based off the awesome freegeoip.net API allowing you to then use this information when presenting the front-end of your website (or another way you see fit).

Example Output

An example of the data set returned in your page XML:

<user-geo-info>
    <Ip>8.8.8.4</Ip>
    <CountryCode>US</CountryCode>
    <CountryName>United States</CountryName>
    <RegionCode>CA</RegionCode>
    <RegionName>California</RegionName>
    <City>Mountain View</City>
    <ZipCode>94043</ZipCode>
    <Latitude>37.4192</Latitude>
    <Longitude>-122.0574</Longitude>
    <MetroCode>807</MetroCode>
    <AreaCode>650</AreaCode>
</user-geo-info>

Usage

There is a request limit of 10,000 per hour.

Alternatively you can download the source code for freegeoip.net off GitHub and run your own server and simply update the $location variable in the class.freegeoip_service.php file.

Installation

A stock-standard install process. Full instructions on how install a Symphony extension can be found on their site.

Adding it to your site

  1. Navigate to Pages and edit the page you wish to have FreeGeoIP information
  2. Add the FreeGeoIP Service Data Source
  3. Finished! You’ll now see the nodeset in the Page XML.

Version History

  • Version 0.3.1 19 May 2014
    – Confirm compatibility with Symphony 2.4
  • Version 0.3 26 April 2014
    – Removed superfluous Response XML node that was simply an extra wrapper
    – Changed root node to conform to Symphony naming practices
  • Version 0.2 25 April 2014
    – Switch to making requests over HTTPS.
  • Version 0.1 25 April 2014
    – Initial public release.

Subscribe

You'll only get 1 email per month containing new posts (I hate spam as much as you!). You can opt out at anytime.

Categories

Leave a Reply

Your email address will not be published. Required fields are marked *

Preview Comment

css.php