예제 #1
0
 function iptocountry($ip)
 {
     return kIP2Location::ipToCountry($ip);
 }
예제 #2
0
 protected static function getCountry()
 {
     if (is_null(self::$_country)) {
         require_once dirname(__FILE__) . '/../request/kIP2Location.php';
         $ipAddress = infraRequestUtils::getRemoteAddress();
         self::$_country = kIP2Location::ipToCountry($ipAddress);
     }
     return self::$_country;
 }
예제 #3
0
<?php

require_once dirname(__FILE__) . '/../bootstrap.php';
var_dump(kIP2Location::ipToCountry($argv[1]));