Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

IP2Location PHP Module

DZone's Guide to

IP2Location PHP Module

·
Free Resource
IP2Location PHP Module allows easy integration between your program written in PHP and the IP2Location Binary (.BIN) data file to lookup the Country, Region, City, Latitude, Longitude, ZIP code, ISP, Domain name, Time zone, Connection speed, IDD code, Area code, Weather station code and Weather station name of the location 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. Get more geolocation information at http://www.ip2location.com and download the source code at http://www.ip2location.com/php.aspx.



  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);

?>
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}