Saturday, October 22, 2011

Joomla - Show Modules based on IP Location... Use mod_MetaMod & GeoLite City

Show Modules based on IP Location... Use mod_MetaMod & GeoLite City


http://forum.mosets.com/showthread.php?t=8638

Why not use the standard free Maxmind db.dat for creating those country/city for reg, searches, alerts and other mappings etc?

So it can be reused for other Joomla, HP extensions as well.

It works fine and is used with the MetaMod - display modules according to rules http://extensions.joomla.org/compone...391/Itemid,35/but I would like to use the same country/city database for HP 1.0 and other extensions too if possible.

Free dls.
http://www.maxmind.com/download/geoi...e/GeoIP.dat.gz and http://www.maxmind.com/download/geoi...iteCity.dat.gz

About
GeoIP Country/City database

* Download the MaxMind GeoLite Country database, uncompress it (it's in gz format), then place it at the location geoip/GeoIP.dat in on your web server root (you will usually require an FTP or SFTP client to upload this to your site).

* For even more power, download the Maxmind GeoLite City database, and install it at geoip/GeoLiteCity.dat. This gives you the ability to make module rules based on the city/state/county/area code/postal code/latitude/longitude of the person viewing the site.


I have this already working in Joomla 1.5.7 where you can localize a user with special messages depending on his ip no (country, city etc).

--------
http://www.maxmind.com/app/geolitecity

GeoLite City

GeoLite City is similar to the GeoIP City database, but is less accurate. Should you require greater accuracy, GeoIP City is a drop-in replacement for GeoLite City. GeoLite City is an ideal cost-effective solution, since it is as accurate as many other commercial geolocation solutions.

We are unable to offer direct support for GeoLite users. Please visit GeoIP Support Center for available documentation and MaxMind Forum if you encounter problems.

Under the license agreement, all advertising materials and documentation mentioning features or use of this database must display the following acknowledgment: "This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/."

Installation details

GeoLite City is offered in binary format, a highly optimized database that supports fast lookups using our Open Source API code. We recommend using the binary files with APIs instead of importing the CSV files into SQL because the binary format is more efficient and is easy to set up and use.

CSV Format

Our CSV format enables you to load the database into a SQL database. The GeoIP City and GeoLite City use the same locationIDs, so the GeoIP City CSV files can be used as a drop in replacement for GeoLite City CSV files without having to change the locationIDs. Note that queries made against the CSV data imported into a SQL database can take up to a few seconds. If performance is an issue, the binary format is much faster, and can handle thousands of lookups per second.

IPv6 GeoLite City database
Our C, C#, PHP, Java, and Perl APIs support IPv6 lookups using our free GeoLite IPv6 City database. We will continue adding support for other APIs as IPv6 gets more widely deployed.

GeoLite City and GeoIP City Comparison

Note: Both databases contain country, region, area code, metro code, city, and postal code information. In addition, some IP addresses will be marked as anonymous proxies and satellite providers.

GeoLite City GeoIP City
Cost Free $370 initial, $90 per month updates
Coverage Worldwide Worldwide
Accuracy Over 99.5% on a country level and 79% on a city level for the US within a 25 mile radius. More details Over 99.8% on a country level and 83% on a city level for the US within a 25 mile radius. More details
Redistribution Free, subject to GPL/LGPL for APIs and database license. Commercial redistribution licenses are available Please contact us.
Updates Updated monthly, at the beginning of each month Updated monthly. For binary format, weekly updates, automated updates available by using geoipupdate program included with C API

1 comment:

  1. Find the city, state and country location of IP Addresses by using free IP Address Locator tool.

    ReplyDelete