PHP Classes

File: iplocator/update/

Recommend this page to a friend!
  Classes of Andras Toth  >  PHP Fast IP Address Locator  >  iplocator/update/  >  Download  
File: iplocator/update/
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Fast IP Address Locator
Get the location of an IP using IPLocation files
Author: By
Last change: New Version First Release
Date: 10 months ago
Size: 1,211 bytes


Class file image Download

Fast ip parsing from local file

Data file (update/IP2LOCATION-LITE-DB11.ZIP) is not exist!<br>
Register to <a href = ""></a><br>
Download IP2LOCATION-LITE-DB11.ZIP file and copy to update folder.<br>
AVG parsing time on my server: 15.6965 us.<br>
Demo: <a href="">Live Demo</a><br>
$loc = IpLocator::getInstance();
//InstallBlocks(true for optimize best performance OR 
//rows per indexed file,true for delete temp files);
$loc->InstallBlocks(true, true);
$loc = IpLocator::getInstance();
$res =  $loc->LocateIp($ip);
	echo 'ip => '.$res['ip'];
	echo 'country_code => '.$res['country_code'];
	echo 'country_name => '.$res['country_name'];
	echo 'region_name => '.$res['region_name'];
	echo 'city_name => '.$res['city_name'];
	echo 'latitude => '.$res['latitude'];
	echo 'longitude => '.$res['longitude'];
	echo 'zip_code => '.$res['zip_code'];
	echo 'time_zone => '.$res['time_zone'];
Detailed description coming soon...
Author: Tóth András

For more information send a message to info at phpclasses dot org.