Skip to content

Commit d08e233

Browse files
committed
update
2 parents 35eeb44 + 8b52b18 commit d08e233

3 files changed

Lines changed: 66 additions & 0 deletions

File tree

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#IP2Location PHP v7
2+
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, MNC, MCC, mobile brand, elevation, and usage type from IP address by using IP2Location database. The library reads the geo location information
3+
from **IP2Location BIN data** file.
4+
5+
This module can be used in many types of projects such as:
6+
7+
1. select the geographically closest mirror
8+
2. analyze your web server logs to determine the countries of your visitors
9+
3. credit card fraud detection
10+
4. software export controls
11+
5. display native language and currency
12+
6. prevent password sharing and abuse of service
13+
7. geotargeting in advertisement
14+
15+
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.
16+
17+
The complete database is available at http://www.ip2location.com under Premium subscription package. This module also support IP2Location IPv6 version.
18+
19+
20+
# Installation
21+
To install this module, unzip the package and copy the following files to your web folder.
22+
1. IP2Location.php
23+
2. example.php
24+
3. databases/IP-COUNTRY-SAMPLE.BIN
25+
4. databases/IPV6-COUNTRY-SAMPLE.BIN
26+
27+
To test this installation, please browse example.php using web browser.
28+
29+
30+
#### Note
31+
This module require php_gmp extension. Please find the below procedures to enable the module.
32+
33+
### For Windows environment:
34+
Uncomment the extension in php.ini by removing the semi-colon
35+
`;extension=php_gmp.dll`
36+
37+
38+
### For Linux/Mac envionment:
39+
`install the php5-gmp package`
40+
41+
42+
# Sample BIN Databases
43+
* Download free IP2Location LITE databases at [http://lite.ip2location.com](http://lite.ip2location.com)
44+
* Download IP2Location sample databases at [http://www.ip2location.com/developers](http://www.ip2location.com/developers)
45+
46+
# Support
47+
Email: support@ip2location.com.
48+
URL: [http://www.ip2location.com](http://www.ip2location.com)

composer.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "ip2location/ip2location-php",
3+
"description": "IP2Location PHP API to get location info from IPv4 and IPv6 address.",
4+
"keywords": ["ip2location", "ip2locationlite", "geolocation"],
5+
"homepage": "http://www.ip2location.com",
6+
"type": "library",
7+
"license": "LGPLv3",
8+
"autoload": {
9+
"classmap": ["IP2Location.php"]
10+
},
11+
"authors": [
12+
{
13+
"name": "IP2Location",
14+
"email": "support@ip2location.com",
15+
"homepage": "http://www.ip2location.com"
16+
}
17+
]
18+
}

databases/IPV6-COUNTRY.SAMPLE.BIN

-76.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)