1.0.0releasedFreeGeoIP Service
Returns a users geo location information based off the awesome freegeoip.net API
Clone URLhttps://github.com/domsammut/freegeoip_service.git
Add as a submodulegit submodule add https://github.com/domsammut/freegeoip_service.git extensions/freegeoip_service --recursive
Compatibility
2.x.x | 2.1.x | 2.2.x | 2.3.x | 2.4.x | 2.5.x | 2.6.x | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.7.4 | 2.7.5 | 2.7.6 | 2.7.7 | 2.7.8 | 2.7.9 | 2.7.10 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
No | No | No | No | 1.0.0 | 1.0.0 | 1.0.0 | 1.0.0 | 1.0.0 | 1.0.0 | 1.0.0 | 1.0.0 | 1.0.0 | 1.0.0 | 1.0.0 | 1.0.0 | 1.0.0 | 1.0.0 |
Readme
FreeGeoIP Service
Returns a users geo location information based off the awesome freegeoip.net API for Symphony CMS
Thanks go to the following people:
- Alexandre Fiori, creator of freegeoip.net
- Joseph Denne, who created GeoLocation Service from which this idea is based off.
House keeping
Any bugs, please report on GitHub. Any feature requests just let me know.
More info about me at https://www.domsammut.com/about and view more info about this extension.
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
- Navigate to Pages and edit the page you wish to have FreeGeoIP information
- Add the
FreeGeoIP Service
Data Source - Finished! You'll now see the nodeset in the Page XML.
Version history
Symphony 2.3.1 to 2.x.x
- Bump to Version 1 and confirm max compatibility to 2.x.x. Thanks for the prompt @twiro.
Requires Symphony 2.3.1
- Confirm compatibility with Symphony 2.6.*
Symphony 2.3.1 to 2.4
- Confirm compatibility with Symphony 2.4
- Removed superfluous Response XML node that was simply an extra wrapper
- Changed root node to conform to Symphony naming practices
- Requests now made over https.
- Initial public release