Welcome!
餃
閮餃
蝢撖園
蝢撖嗥曄
蝢撖嗉憯
蝢撖嗉賣
蝢撖嗅啣
擐
>
摮豢雄 / Cultivation Career
>
摮賊 Academy
>
蝘摮
>
蝘
>
鞈閮
>
蝔撘閮剛
>
PHP
Advanced
PHP
雿:
銝餅:
Tags:
Message:
HP Wrote: ------------------------------------------------------- > 銝畾 PHP 蝔撘蝣澆 php script > 撠勗臭誑敺 IP Address 詨鞈閮 > > > $country = > file_get_contents('http://api.hostip.info/country. > php?ip='.$_SERVER['REMOTE_ADDR']; > echo $country; > > > 箸砍撠望臭誑 HTTP URL (GET) 孵 > > http://api.hostip.info/country.php?ip=140.112.41.7 > 0 > > IP-to-Country 鞈閮嚗 echo > 箔 > > (隢瘜冽嚗祇隞蝝寧雿瘜祉箔誑銝 > PHP 蝔撘蝣潘雿隞乩拍函蝬脣 > http://www.ipmango.com/api.php > 隡澆歇銝賭蝙具 2009.11.04) > > > $ip = '59.32.28.65'; > $url = "http://www.ipmango.com/api.php?ip=".$ip; > $xml = simplexml_load_file($url); > echo "IP address : {$xml->ipaddress} \n"; > echo "City : {$xml->city} \n"; > echo "Region : {$xml->region} \n"; > echo "Country Name : {$xml->countryname} \n"; > echo "Latitude : {$xml->latitude} \n"; > echo "Longitude : {$xml->longitude} \n"; > > > Reference: > IP-to-Country: > http://www.daniweb.com/forums/thread47999.html > PHP Script to find Visitor's Location (2008/10/27)