IPInfoDB

Free IP address geolocation tools


好東西@0@

只要丟個ip給他~~~~他就會跟你講你在哪個國家~~

假如希望來自不同國家的使用者~進到你網站~~~~預先知道他在哪~~~~再assign不同語言給他~

就可以用這個~~~例如

$xml = file_get_contents("http://ipinfodb.com/ip_query_country.php?ip=".$ipAddr);

他會幫你取個XML回來~~~~假如不給ip~~~他就會自動抓你現在request的ip

<Response>
<Ip>122.116.156.137</Ip>
<Status>OK</Status>
<CountryCode>TW</CountryCode>
<CountryName>Taiwan</CountryName>
</Response>

之後就看要怎麼運用囉~~~~個人覺得蠻方便的XD

而且他的IP Database還提供給你下載說~~~

http://ipinfodb.com/ip_database.php

底下也有SQL教學


另外也提供Apache的allow or deny

http://ipinfodb.com/ip_country_block.php

只要點你想要哪些國家進得來或進不來~~~~~他自動就幫你產生.htaccess

很方便說~


http://ipinfodb.com/index.php

沒有留言: