|
|
|
 |
IP2Location PHP Module
|
 |
|
|
| IP2Location is a PHP module that enables the user to
find the country, region, city, coordinates, zip code, ISP, domain name,
timezone, connection speed, IDD code, area code, weather station code and
weather station name that any IP address or host name originates from. It
has been optimized for speed and memory utilization. Developers can use the API
to query all IP2Location™ binary databases for applications supporting PHP. |
| |
|
|
|
|
| |
| |
Download - Sample .BIN Files |
|
|
|
|
| Note: The demo version of Binary (.BIN)
data file consists of IP address range from 0.0.0.0 to 99.255.255.255. The
complete Binary (.BIN) data file is available for all paid subscribers at no
extra cost. Please contact our sales department for the download information. |
| |
| |
Complete .BIN Files (Subscription Required)
|
|
|
|
|
| |
|
|
| Browse sample-IP2Location.php using any web browser
through web server. |
| |
|
|
| IP2Location_open(filename,
mode)
|
Open IP2Location binary database from a
local path. |
|
| IP2Location_get_all(IP2Location,
ip_address)
|
Returns an array of country short name, country long
name, region, city, latitude, longitude and domain name for an IP address. |
|
|
| IP2Location_close(IP2Location) |
Close IP2Location binary database from a local path. |
|
| |
|
|
|
<?php
include("IP2Location.inc.php");
$ip = IP2Location_open("samples/IP-COUNTRY-SAMPLE.BIN", IP2LOCATION_STANDARD);
$record = IP2Location_get_all($ip, "35.1.1.1");
echo "$record->country_short : " . $record->country_short;
echo "$record->country_long : " . $record->country_long;
echo "$record->region : " . $record->region;
echo "$record->city : " . $record->city;
echo "$record->isp : " . $record->isp;
echo "$record->latitude : " . $record->latitude;
echo "$record->longitude : " . $record->longitude;
echo "$record->domain : " . $record->domain;
echo "$record->zipcode : " . $record->zipcode;
echo "$record->timezone : " . $record->timezone;
echo "$record->netspeed : " . $record->netspeed;
echo "$record->idd_code : " . $record->idd_code;
echo "$record->area_code : " . $record->area_code;
echo "$record->weather_code : " . $record->weather_code;
echo "$record->weather_name : " . $record->weather_name;
echo "$record->ipaddr : " . $record->ipaddr;
echo "$record->ipno : " . $record->ipno;
IP2Location_close($ip);
?>
|
| |
| |
| |
|
|
|
 |
| |
|
|
| |
|
|
 |
| |
|
|
| |
|
|
 |
| |
Need help? Let me assist you to pick
the right IP2Location products.
Click me now! |
| |
|
|
|
 |
|
|
|
 |
| "No doubt why security expert, Mike Schiffman, author of
the Hacker’s Challenge book series recommended IP2Location™ in IP Geo project". |
|
| - S. Jones, California (United States)
|
|
| "I am very satisfied with my purchase for my ip address
log analysis project. Got my account immediately right after order approved. No
hassle or delay time at all as I always thought. A must to meet project
deadline".
|
|
| - J. Wagner, New York (United States)
|
|
| "Innovative products with low price tags compared with
others million dollars geo-targeting products". |
|
| - Balakrishnan, Bangalore (India)
|
|
|
|
|
 |
| |
Earn up to 20% on Sales from New
Customer and
2-Year Return Commission |
|
| More Information |
|
|
|
|
 |
|
|
|
 |
| |
| Take a closer look in this in-depth tour and learn
more about IP2Location™ products: |
|
|
|
|
|
|
|
|
 |
 |
|
|
|
|