gdr2_get_country_code_by_ip($ip = "", $timeout = 24)
- $ip: ip address. Leave empty to get current visitor ip.
- $timeout: how long to keep the cached value.
Get country code by IP. Function is using HostIP service webiste, and supports caching of results.
Function returns: string country code will return found code, or XX if not found, or ERROR if request failed.