Net_GeoIP::lookupCountryCode()

Net_GeoIP::lookupCountryCode() --  returns 2-letter country code (e.g. "CA") for specified IP address

Synopsis

require_once "Net/GeoIP.php";

string lookupCountryCode() (string $addr)

Description

This method returns the 2-letter country code for the given IP address. It works with both the free and the non-free databases.

Parameter

Throws

This method throws an exception if the IP address is invalid or if the database type is incorrect.