IP2Location (PHP Module)
This PHP module provides fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection speed, IDD code, area code, weather station code, weather station name, mcc, mnc, mobile brand, elevation, and usage type from IP address by using IP2Location database. This module uses a file based database available at IP2Location.com.
This database simply contains IP blocks as keys, and other information such as country, region, city, latitude, longitude, ISP and domain name as values.
This module can be used in many types of projects such as:
1) select the geographically closest mirror
2) analyze your web server logs to determine the countries of your visitors
3) credit card fraud detection
4) software export controls
5) display native language and currency
6) prevent password sharing and abuse of service
7) geotargeting in advertisement
The database will be updated in monthly basis for the greater accuracy. Free sample database is available at /samples directory or download it from http://www.ip2location.com/developers.aspx.
The free lite database is available at http://lite.ip2location.com.
The complete database is available at http://www.ip2location.com under Premium subscription package. This module also support IP2Location IPv6 version.
To install this module, unzip the package and copy the following files to your web folder.
To test this installation, please browse sample.php using web browser.
Please take note that this solution will works with the BIN database download from ip2location.com.
The LITE database is available at http://lite.ip2location.com for free download.
The complete database is available at http://www.ip2location.com under subscription package.
COPYRIGHT AND LICENCE
Copyright (C) 2005-2013 by IP2Location.com, firstname.lastname@example.org
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; If not, see <http://www.gnu.org/licenses/>.