[[IP2Country]]
Kód: Vybrať všetko
$ip = $_SERVER['REMOTE_ADDR'];
$ip=!is_numeric($ip)?$ip:long2ip($ip);
if(!$host=gethostbyaddr($ip)) return null;
if(preg_match("/\.([a-z]+)$/i", $host, $matches)) return strtolower($matches[1]); else return false;
Moderátor: Moderators
Kód: Vybrať všetko
$ip = $_SERVER['REMOTE_ADDR'];
$ip=!is_numeric($ip)?$ip:long2ip($ip);
if(!$host=gethostbyaddr($ip)) return null;
if(preg_match("/\.([a-z]+)$/i", $host, $matches)) return strtolower($matches[1]); else return false;
Kód: Vybrať všetko
http://mirrors.inway.cz/manual/en/reference.pcre.pattern.syntax.php
Kód: Vybrať všetko
http://rtm.etomite.sk/index.php?id=18