function test_getCountryIdByHostName()
 {
     foreach ($this->hosts as $host => $expected) {
         $rv = fbGeoIP_Free_Binary::getCountryIdByHostName($host);
         $this->assertEquals($expected, $rv, "host='{$host}'");
     }
 }
Beispiel #2
0
 function getCountryNameByHostName($name)
 {
     include_once FREEBEER_BASE . '/lib/ISO3166.php';
     $cc = fbGeoIP_Free_Binary::getCountryIdByHostName($name);
     $rv = fbISO3166::getCountryName($cc);
     return $rv ? $rv : $cc;
 }