The CountryName method returns the country name for the IP address associated with the currently initialized CountryHawk object, as defined in countrynames.properties. You can also use this method to look up the country name for any two-letter county code returned by the CountryCode property.
Note: Use of this method requires the Professional or Enterprise Edition of CountryHawk.
Syntax:
countryNameAsStr = chObj.CountryCode [twoLetterCodeToLookupAsStr]
twoLetterCodeToLookupAsStr: Optional. Two letter code to lookup.
Returns:
If no twoLetterCodeToLookupAsStr parameter is specified, this method returns the name for the IP address associated with chObj. If twoLetterCodeToLookup is specified, this method returns the country name for that two-letter code.
Example 1:
'Return country name where current visitor is from
set chObj = Server.CreateObject("cyScape.countryObj")
response.write "Your country code name: " & chObj.CountryName
Example 2:
'Return country name for a two-letter country code previously obtained
'by a call to CountryCode
set chObj = Server.CreateObject("cyScape.countryObj")
response.write "The country name for FR is: " & chObj.CountryName "FR"
Tip: See the ch_codeLookup.asp sample for more information.
See Also:
About the Properties and Methods Guide
RegionNameFromCountryCode Method
About the sample scripts