PHP CLASS:find the city, state/region, and country associated with an IP addres

เริ่มโดย astkboy2008, 16 มกราคม 2010, 02:28:18

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

astkboy2008

IPGeolocation is a PHP class which provides an easy-to-use interface to the IP Address Location XML API described at ipinfodb.com. This API allows you to find the city, state/region, and country associated with an IP address, as well as the address's approximate latitude and longitude.
Usage:
require_once('IPGeolocation.class.php');
$location = new IPGeolocation($ipAddressString);
// do some error checking here
$strCityStateCountry $location->getFriendlyLocation();
this is really usefull script recently i saw many people ask how i can get the country from an ip

use quick view tools:IPGeolocation.class.php [9.76 KB] or download:ipgeolocation-1.0.zip [3.8 KB]