示例#1
0
 function test_getCountryIdByHostName()
 {
     foreach ($this->hosts as $host => $expected) {
         $rv = fbGeoIP_Free_Ascii::getCountryIdByHostName($host);
         $this->assertEquals($expected, $rv, "host='{$host}'");
     }
 }
示例#2
0
文件: Ascii.php 项目: Artea/freebeer
 function getCountryNameByHostName($name)
 {
     include_once FREEBEER_BASE . '/lib/ISO3166.php';
     $cc = fbGeoIP_Free_Ascii::getCountryIdByHostName($name);
     $rv = fbISO3166::getCountryName($cc);
     return $rv ? $rv : $cc;
 }