ThaiSEOBoard.com

พัฒนาเว็บไซต์ => Programming => หัวข้อเริ่มโดย: astkboy2008 ใน 16 มกราคม 2010, 02:28:18

ชื่อเรื่อง: PHP CLASS:find the city, state/region, and country associated with an IP addres
โพสต์โดย: astkboy2008 ใน 16 มกราคม 2010, 02:28:18
IPGeolocation (http://www.jooria.com/scripts/Geography-139/IPGeolocation-954/index.html) 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] (http://www.jooria.com/view/file/472/1) or download:ipgeolocation-1.0.zip [3.8 KB] (http://www.jooria.com/downloads/472/ipgeolocation-1.0.zip)