PHP Classes

IP2Location: Lookup the geographic location of an IP address

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2006-10-30 (9 years ago) RSS 2.0 feedStarStar 36%Total: 3,143 This week: 1All time: 1,090 This week: 1,146Down
Version License Categories  
ip2location 1.0Freely DistributableNetworking, Geography
Description Author  

This package can be used to lookup the geographic location of the network of an IP address using IP database files provided by the IP2Location service.

It provides functions can lookup the location of an IP address and return location record objects that contain the country, region, city, latitude, longitude, ISP and domain name from IP address.

The IP database files are available from

Picture of KL Liew
Name: KL Liew <contact>
Classes: 1 package by
Country: Malaysia Malaysia
Age: ???
All time rank: 9572 in Malaysia Malaysia
Week rank: 919 Up2 in Malaysia Malaysia Equal

IP2Location (PHP Module)

This PHP module provides fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name and connection speed from IP address by using IP2Location database. This module uses a file based database available at 

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

The complete database is available at 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.
 ii)  sample-IP2Location.php
To test this installation, please browse sample-IP2Location.php using web browser.


The complete database is available at under subscription package.


Copyright (C) 2005-2006 by,
  Files folder image Files  
File Role Description
Accessible without login Plain text file Class IP2Location PHP API
Accessible without login Plain text file sample-IP2Location.php Example Sample PHP Code
Accessible without login Plain text file ChangeLog Data Changes Log
Accessible without login Plain text file README Doc. Read Me Documentation

 Version Control Unique User Downloads Download Rankings  
 0%Total:3,143All time:1,090
 This week:1This week:1,146Down
User Ratings User Comments (1)  
 All time